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

not found tf_sampling_so.so during the training. #142

Open
MrCrazyCrab opened this issue Aug 14, 2019 · 6 comments
Open

not found tf_sampling_so.so during the training. #142

MrCrazyCrab opened this issue Aug 14, 2019 · 6 comments

Comments

@MrCrazyCrab
Copy link

@charlesq34 Charles R. Qi, i follow your advice to compile the tf, but when i run the program, the software warns me that the tf_sampling_so.so can not be found and the "undefined symbol: _ZN10tensorflow12OpDefBuilder4AttrESs". i'm sure that the progress of compiling the tf is right. i use tensorflow 1.13.1, cuda 10.0, anaconda 10.130 and spyder 3.3.6.
Hope for you reply!
Thanks!

@sheshap
Copy link

sheshap commented Aug 17, 2019

Use below commands and see if it works for you.

/usr/local/cuda/bin/nvcc --gpu-architecture=sm_35 --compiler-options -Wall -I/usr/local/cuda/include -L/usr/local/cuda/lib tf_sampling_g.cu -o tf_sampling_g.cu.o -c -O2 -DGOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -lcusolver -lcurand -lcublas -lcusparse -g

TF_CFLAGS=$(python -c 'import tensorflow as tf; print(" ".join(tf.sysconfig.get_compile_flags()))')
TF_LFLAGS=$(python -c 'import tensorflow as tf; print(" ".join(tf.sysconfig.get_link_flags()))')

g++ -std=c++11 -shared tf_sampling.cpp tf_sampling_g.cu.o -o tf_sampling_so.so -fPIC ${TF_CFLAGS[@]} ${TF_LFLAGS[@]} -I /usr/local/cuda/include -lcudart -L /usr/local/cuda/lib -O2 -D_GLIBCXX_USE_CXX11_ABI=0 -lcusolver -g

@jtx1999
Copy link

jtx1999 commented Sep 4, 2019

Please see if #48 solves your problem.

@wumingbai
Copy link

did you solve the problem

@jtx1999
Copy link

jtx1999 commented Sep 4, 2019

Yes, by removing -D_GLIBCXX_USE_CXX11_ABI=0

@MrCrazyCrab
Copy link
Author

@jtx1999 @sheshappanavar it still won't work when running tensorflow1.13.1. do you know how to slove it?

@manishmaruthi
Copy link

@sheshap Thank you so much for posting the commands, in my case it solved the issue

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

5 participants