Skip to content

Commit

Permalink
Using CompilerInterface from build dir
Browse files Browse the repository at this point in the history
  • Loading branch information
RajivChitale committed Feb 7, 2024
1 parent 289c68d commit e45b006
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
7 changes: 1 addition & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ add_subdirectory(MLModelRunner)
add_subdirectory(SerDes)
add_subdirectory(test)

add_custom_target(copy)
add_custom_command(TARGET copy PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy CompilerInterface ${CMAKE_CURRENT_BINARY_DIR}/MLModelRunner/CompilerInterface)

if(LLVM_MLBRIDGE)
include(AddLLVM)
include(HandleLLVMOptions)
Expand All @@ -54,9 +51,6 @@ if(LLVM_MLBRIDGE)
ADDITIONAL_HEADER_DIRS
${CMAKE_CURRENT_SOURCE_DIR}/include

DEPENDS
copy

LINK_LIBS
ModelRunnerLib
SerDesLib
Expand Down Expand Up @@ -94,3 +88,4 @@ endif(LLVM_MLBRIDGE)

install(DIRECTORY include/ DESTINATION include)
install(DIRECTORY CompilerInterface DESTINATION MLModelRunner/CompilerInterface)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/CompilerInterface DESTINATION ${CMAKE_BINARY_DIR}/MLModelRunner/)
1 change: 0 additions & 1 deletion test/MLBridgeTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ void testPrimitive(std::string label, T1 value, T2 expected) {
std::pair<std::string, T1> p("request_" + label, value);
MLRunner->populateFeatures(p);
T2 out = MLRunner->evaluate<T2>();

debug_out << " " << label << " reply: " << out << "\n";
if (std::abs(out - expected) > 10e-6) {
std::cerr << "Error: Expected " << label << " reply: " << expected
Expand Down
2 changes: 1 addition & 1 deletion test/mlbridge-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
BUILD_DIR = "../build_release"
sys.path.extend(
[
"../CompilerInterface",
f"{BUILD_DIR}/MLModelRunner/CompilerInterface",
f"{BUILD_DIR}/MLModelRunner/gRPCModelRunner/Python-Utilities",
]
)
Expand Down

0 comments on commit e45b006

Please sign in to comment.