Skip to content

Commit

Permalink
tf-head: Fix undefined symbols by linking libtensorflow_cc.so.2 (horo…
Browse files Browse the repository at this point in the history
…vod#3755)

Signed-off-by: Max H. Gerlach <git@maxgerlach.de>
  • Loading branch information
maxhgerlach authored Dec 9, 2022
1 parent 58cb313 commit 35b27e9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmake/Modules/FindTensorflow.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ if (LEN EQUAL "4")
if (Tensorflow_VERSION VERSION_GREATER_EQUAL "2.6")
# XLA implementations and helpers for resource variables are in _pywrap_tensorflow_internal.so
set(Tensorflow_LIBRARIES "${Tensorflow_LIBRARIES} ${Tensorflow_LIB_PATH}/python/_pywrap_tensorflow_internal.so")
set(lib_tensorflow_cc_so_path "${Tensorflow_LIB_PATH}/libtensorflow_cc.so.2")
if (EXISTS "${lib_tensorflow_cc_so_path}")
# TF 2.12: https://github.com/tensorflow/tensorflow/pull/55941 moves implementations to new libtensorflow_cc.so
set(Tensorflow_LIBRARIES "${Tensorflow_LIBRARIES} ${lib_tensorflow_cc_so_path}")
endif()
endif()
message("Tensorflow_LIBRARIES := ${Tensorflow_LIBRARIES}")
list(GET Tensorflow_OUTPUT 3 Tensorflow_COMPILE_FLAGS)
Expand Down

0 comments on commit 35b27e9

Please sign in to comment.