8000 tf-head: Fix undefined symbols by linking libtensorflow_cc.so.2 by maxhgerlach · Pull Request #3755 · horovod/horovod · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

tf-head: Fix undefined symbols by linking libtensorflow_cc.so.2 #3755

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does the .2 stand for?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope that stands for TensorFlow 2.x, but I have not dived into the build system to confirm. The main library in that path is libtensorflow_framework.so.2. We get the latter via tf.sysconfig.get_link_flags(), but I couldn't find an API to resolve the new 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