@@ -190,25 +190,14 @@ target_link_libraries(backend PRIVATE backend_obj)
190
190
191
191
## backend: TensorFlow support ##
192
192
if (USE_TENSORFLOW)
193
- add_library (tensorflow_cc INTERFACE )
194
- target_include_directories (tensorflow_cc INTERFACE ${LIBTF_DIR} /tensorflow/include )
195
- target_include_directories (tensorflow_cc INTERFACE ${LIBTF_DIR} /protobuf/include )
196
- target_link_libraries (tensorflow_cc INTERFACE ${LIBTF_DIR} /tensorflow/lib/libtensorflow_cc.so)
197
- target_link_libraries (tensorflow_cc INTERFACE ${LIBTF_DIR} /tensorflow/lib/libtensorflow_framework.so)
198
-
199
- add_library (tensorflow_wrapper src/nexus/backend/tensorflow_wrapper.cpp)
200
- target_include_directories (tensorflow_wrapper PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} /src)
201
- target_link_libraries (tensorflow_wrapper PUBLIC tensorflow_cc)
202
-
203
- # TensorFlow is currently built with C++14. Some TensorFlow APIs expose
204
- # pre-adopted std types with absl. To avoid weird ABI compatibility issues,
205
- # compile the wrapper with the same C++ standard as TensorFlow.
206
- target_compile_options (tensorflow_wrapper PRIVATE -std=c++14)
207
-
208
- target_compile_definitions (backend_obj PUBLIC USE_TENSORFLOW)
193
+ add_library (tfwrapper INTERFACE )
194
+ target_include_directories (tfwrapper INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} /tensorflow/include )
195
+ target_link_libraries (tfwrapper INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} /tensorflow/lib/libtensorflow_wrapper.so)
196
+ target_compile_definitions (tfwrapper INTERFACE USE_TENSORFLOW)
197
+
209
198
target_sources (backend_obj PRIVATE
210
199
src/nexus/backend/tensorflow_model.cpp)
211
- target_link_libraries (backend_obj PUBLIC tensorflow_wrapper )
200
+ target_link_libraries (backend_obj PUBLIC tfwrapper )
212
201
endif ()
213
202
214
203
## backend: Caffe2 support ##
@@ -279,7 +268,6 @@ endif()
279
268
## backend: CUDA support ##
280
269
if (USE_GPU)
281
270
target_compile_definitions (common PUBLIC USE_GPU)
282
- target_compile_definitions (tensorflow_wrapper PUBLIC USE_GPU)
283
271
target_include_directories (common PUBLIC ${CUDA_PATH} /include )
284
272
target_link_libraries (common PUBLIC
285
273
${CUDA_PATH} /lib64/stubs/libcuda.so
@@ -339,12 +327,11 @@ target_link_libraries(stress_rankmt PUBLIC bench_dispatcher_obj)
339
327
340
328
341
329
###### tools/test_gpu_mem_sharing ######
342
- if (USE_GPU AND USE_TENSORFLOW)
343
- add_executable (test_gpu_mem_sharing tools/test_gpu_mem_sharing.cpp)
344
- target_link_libraries (test_gpu_mem_sharing PUBLIC common)
345
- target_link_libraries (test_gpu_mem_sharing PUBLIC tensorflow_wrapper)
346
- target_link_libraries (test_gpu_mem_sharing PUBLIC tensorflow_cc)
347
- endif ()
330
+ # if(USE_GPU AND USE_TENSORFLOW)
331
+ # add_executable(test_gpu_mem_sharing tools/test_gpu_mem_sharing.cpp)
332
+ # target_link_libraries(test_gpu_mem_sharing PUBLIC common)
333
+ # target_link_libraries(test_gpu_mem_sharing PUBLIC tfwrapper)
334
+ # endif()
348
335
349
336
350
337
0 commit comments