Tensorflow op library problems after update

942 views
Skip to first unread message

Eddy Ilg

unread,
Jan 10, 2018, 9:34:25 AM1/10/18
to Discuss
Hi,


I just updated tensorflow with pip3 (now to version 1.4.1). After it I am having problems:

I have a custom op library that I compile with -D _GLIBCXX_USE_CXX11_ABI=0. The library compiles and links fine. Importing it into tensorflow gives:

Traceback (most recent call last):
  ...
  File "../x.py", line 29, in <module>
    lib = tf.load_op_library(_lib_path)
  File "/home/ilge/.local/lib/python3.5/site-packages/tensorflow/python/framework/load_library.py", line 56, in load_op_library
    lib_handle = py_tf.TF_LoadLibrary(library_filename, status)
  File "/home/ilge/.local/lib/python3.5/site-packages/tensorflow/python/framework/errors_impl.py", line 473, in __exit__
    c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.NotFoundError: /path/to/mylib.so: undefined symbol: _ZTIN10tensorflow8OpKernelE

It seems it cannot load general tensorflow symbols. Hints on how I could debug it are very appreciated. Note that before the update and before recompiling everything was working.

Best,



Eddy

Allen Lavoie

unread,
Jan 10, 2018, 12:29:58 PM1/10/18
to Eddy Ilg, Discuss
Starting with 1.4, custom ops need to link against libtensorflow_framework.so. It's included in the pip package. This is to support custom ops in languages other than Python, and so we don't need to load TF symbols into the global symbol table.

Recompiling with these instructions should just work (the linker flags include -ltensorflow_framework): https://www.tensorflow.org/versions/master/extend/adding_an_op#compile_the_op_using_your_system_compiler_tensorflow_binary_installation

--
You received this message because you are subscribed to the Google Groups "Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+unsubscribe@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/85ec5fc3-d88f-4a3f-8dd5-7c541eae7a68%40tensorflow.org.

Reply all
Reply to author
Forward
0 new messages