Skip to content

Commit

Permalink
Better way of detecting CUDA support in pip-found TF.
Browse files Browse the repository at this point in the history
  • Loading branch information
peci1 committed Apr 20, 2020
1 parent 2be03b7 commit 8527529
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmake/detect_tf_pip.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@ if(NOT EXISTS ${TENSORFLOW_LIBRARY2})
endif()

execute_process(
COMMAND ldd ${TENSORFLOW_LIBRARY}
OUTPUT_VARIABLE LDD_OUTPUT
COMMAND nm -CD ${TENSORFLOW_ORIG_LIBRARY}
OUTPUT_VARIABLE NM_OUTPUT
)
if(${LDD_OUTPUT} MATCHES "libcudart.so")
if(${NM_OUTPUT} MATCHES "cudaError")
set(HAS_TENSORFLOW_GPU 1)
message("-- -- The Tensorflow library is compiled with CUDA support.")
else()
Expand Down

0 comments on commit 8527529

Please sign in to comment.