File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,7 +59,6 @@ if(LLVM_MLBRIDGE)
5959 SerDesLib
6060 )
6161
62- target_compile_options (LLVMMLBridge PUBLIC -frtti -fexceptions )
6362
6463
6564 target_include_directories (LLVMMLBridge SYSTEM PUBLIC ${Protobuf_INCLUDE_DIRS} ${TENSORFLOW_AOT_PATH} /include )
Original file line number Diff line number Diff line change @@ -52,5 +52,5 @@ endif()
5252set_property (TARGET ModelRunnerLib PROPERTY POSITION_INDEPENDENT_CODE 1 )
5353
5454find_package (Torch REQUIRED )
55- target_link_libraries (ModelRunnerLib PUBLIC ${TORCH_LIBRARIES} )
56- target_compile_options (ModelRunnerLib PUBLIC -frtti -fexceptions )
55+ target_link_libraries (ModelRunnerLib PRIVATE ${TORCH_LIBRARIES} )
56+ target_compile_options (ModelRunnerLib PRIVATE -fexceptions )
Original file line number Diff line number Diff line change 1- # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -DORT_NO_EXCEPTIONS")
2- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra" )
1+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -DORT_NO_EXCEPTIONS" )
2+ # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
33set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra" )
44
55#onnxruntime providers
@@ -56,6 +56,4 @@ target_include_directories(ONNXModelRunnerLib PUBLIC "${ONNXRUNTIME_ROOTDIR}/inc
5656target_link_directories (ONNXModelRunnerLib PUBLIC ${ONNXRUNTIME_ROOTDIR} /lib )
5757target_link_libraries (ONNXModelRunnerLib PRIVATE onnxruntime )
5858
59- # find_package(Torch REQUIRED)
60- # target_link_libraries(ONNXModelRunnerLib PRIVATE ${TORCH_LIBRARIES})
61- target_compile_options (ONNXModelRunnerLib PUBLIC -frtti -fexceptions )
59+ # target_compile_options (ONNXModelRunnerLib PRIVATE -fexceptions)
Original file line number Diff line number Diff line change 1+ find_package (Torch REQUIRED )
2+
13set (protobuf_MODULE_COMPATIBLE TRUE )
24find_package (Protobuf CONFIG REQUIRED )
35
@@ -11,25 +13,14 @@ pytorchSerDes.cpp
1113tensorflowSerDes.cpp
1214JSON.cpp
1315)
14- # target_compile_options (SerDesLib PUBLIC -fexceptions)
1516
1617else ()
1718 add_library (SerDesLib OBJECT TensorSpec.cpp jsonSerDes.cpp bitstreamSerDes.cpp protobufSerDes.cpp tensorflowSerDes.cpp JSON.cpp pytorchSerDes.cpp )
18- # add_library(SerDesLib OBJECT TensorSpec.cpp jsonSerDes.cpp bitstreamSerDes.cpp JSON.cpp pytorchSerDes.cpp)
1919
2020 # add_library(SerDesCLib OBJECT TensorSpec.cpp jsonSerDes.cpp bitstreamSerDes.cpp JSON.cpp)
2121endif ()
2222
23+ target_link_libraries (SerDesLib PRIVATE ${TORCH_LIBRARIES} )
24+ target_compile_options (SerDesLib PRIVATE -fexceptions )
2325target_include_directories (SerDesLib PUBLIC ${TENSORFLOW_AOT_PATH} /include )
24- target_link_libraries (SerDesLib PUBLIC tf_xla_runtime )
25-
26- find_package (Torch REQUIRED )
27- target_link_libraries (SerDesLib PUBLIC ${TORCH_LIBRARIES} )
28- target_compile_options (SerDesLib PUBLIC -frtti -fexceptions )
29-
30- # Testing
31- message ("PROTOBUF INCLUDES FROM ${Protobuf_INCLUDE_DIRS} " )
32- target_include_directories (SerDesLib
33- PRIVATE ${CMAKE_BINARY_DIR} /include/Service
34- PUBLIC ${Protobuf_INCLUDE_DIRS}
35- )
26+ target_link_libraries (SerDesLib PRIVATE tf_xla_runtime )
You can’t perform that action at this time.
0 commit comments