Skip to content
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

test_custom.py errors #3

Open
lixinfan opened this issue Jul 31, 2017 · 1 comment
Open

test_custom.py errors #3

lixinfan opened this issue Jul 31, 2017 · 1 comment

Comments

@lixinfan
Copy link

lixinfan commented Jul 31, 2017

After compiling the "simple" example, custom.so is properly created:
Makefile custom_op.h custom_op_cpu.h custom_op_gpu.cu custom_op_gpu.o
custom.so custom_op_cpu.cpp custom_op_cpu.o custom_op_gpu.cuh test_custom.py

But running test_custom.py resulted in a "./custom.so: undefined symbol" error as follows. Any ideas about how to fix it? I am testing with tfopgen (0.2.4) and tensorflow (1.1.0-rc2), in case it matters.

python test_custom.py
E

ERROR: test_custom (main.TestCustom)
Test the Custom operator

Traceback (most recent call last):
File "test_custom.py", line 12, in setUp
self.custom = tf.load_op_library('./custom.so')
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/load_library.py", line 64, in load_op_library
None, None, error_msg, error_code)
NotFoundError: ./custom.so: undefined symbol: _ZN10tensorflow8internal21CheckOpMessageBuilder9NewStringEv


Ran 1 test in 0.015s

FAILED (errors=1)

@lixinfan
Copy link
Author

lixinfan commented Aug 2, 2017

I managed to solve the problem, by commenting out following flag in the generated Makefile
# -D_GLIBCXX_USE_CXX11_ABI=0

I am not sure about causes of the problem and the solution, but the idea came from this tensforflow issue disucssion: tensorflow/tensorflow#4118

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant