diff options
Diffstat (limited to 'tensorflow/contrib/cmake/tf_tools.cmake')
-rw-r--r-- | tensorflow/contrib/cmake/tf_tools.cmake | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tensorflow/contrib/cmake/tf_tools.cmake b/tensorflow/contrib/cmake/tf_tools.cmake index c518414f0c..6ef9598963 100644 --- a/tensorflow/contrib/cmake/tf_tools.cmake +++ b/tensorflow/contrib/cmake/tf_tools.cmake @@ -73,10 +73,13 @@ add_executable(${transform_graph} $<TARGET_OBJECTS:tf_core_direct_session> $<TARGET_OBJECTS:tf_tools_transform_graph_lib> $<TARGET_OBJECTS:tf_core_kernels> + $<$<BOOL:${tensorflow_ENABLE_GPU}>:$<TARGET_OBJECTS:tf_core_kernels_cpu_only>> + $<$<BOOL:${tensorflow_ENABLE_GPU}>:$<TARGET_OBJECTS:tf_stream_executor>> ) target_link_libraries(${transform_graph} PUBLIC tf_protos_cc + ${tf_core_gpu_kernels_lib} ${tensorflow_EXTERNAL_LIBRARIES} ) @@ -92,10 +95,13 @@ add_executable(${summarize_graph} $<TARGET_OBJECTS:tf_core_direct_session> $<TARGET_OBJECTS:tf_tools_transform_graph_lib> $<TARGET_OBJECTS:tf_core_kernels> + $<$<BOOL:${tensorflow_ENABLE_GPU}>:$<TARGET_OBJECTS:tf_core_kernels_cpu_only>> + $<$<BOOL:${tensorflow_ENABLE_GPU}>:$<TARGET_OBJECTS:tf_stream_executor>> ) target_link_libraries(${summarize_graph} PUBLIC tf_protos_cc + ${tf_core_gpu_kernels_lib} ${tensorflow_EXTERNAL_LIBRARIES} ) @@ -111,10 +117,13 @@ add_executable(${compare_graphs} $<TARGET_OBJECTS:tf_core_direct_session> $<TARGET_OBJECTS:tf_tools_transform_graph_lib> $<TARGET_OBJECTS:tf_core_kernels> + $<$<BOOL:${tensorflow_ENABLE_GPU}>:$<TARGET_OBJECTS:tf_core_kernels_cpu_only>> + $<$<BOOL:${tensorflow_ENABLE_GPU}>:$<TARGET_OBJECTS:tf_stream_executor>> ) target_link_libraries(${compare_graphs} PUBLIC tf_protos_cc + ${tf_core_gpu_kernels_lib} ${tensorflow_EXTERNAL_LIBRARIES} ) |