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

tf_ops compilation and CUDA version #10

Open
Vishak66 opened this issue Dec 4, 2020 · 3 comments
Open

tf_ops compilation and CUDA version #10

Vishak66 opened this issue Dec 4, 2020 · 3 comments

Comments

@Vishak66
Copy link

Vishak66 commented Dec 4, 2020

Hello Lin,

Do I need to compile the .sh scripts under tf_ops first? Kindly advise on how to compile the tf operators.

Also did you test it in a specific cuda/cudnn version?

@dlinzhao
Copy link
Owner

dlinzhao commented Dec 6, 2020

@Vishak66 The code is tested under TF1.7 GPU version, CUDA 9.0, cudnn 7.0.5 and Python 3.6 on Ubuntu 16.04. There are also some dependencies for a few Python libraries for data processing like h5py etc. It's highly recommended that you have access to GPUs. The TF operators are included under tf_ops, you need to compile them (check tf_xxx_compile.sh under each ops subfolder) first. Update nvcc and python path if necessary. Then, you can compile it by sh tf_xxx_compile.sh.

@Daniel22L
Copy link

Hello Lin,

I am trying to compile the tf_xxx_compile.sh. I am working with TF1.4 and Python 3.5, following the JSNet instructions (I am working with the udocker image tensorflow/tensorflow:1.4.0-gpu-py3). When I execute the one in the folder 3d_interpolation I have the following error:

tf_interpolate.cpp:6:37: fatal error: tensorflow/framework/op.h: No such file or directory
compilation terminated.

I have not modified anything beause I have seen that the pointnet++ original file has been modified in JSNet to work with TF1.4.

To see what could be, I have downloaded pointnet++ code. I have try to compile the same file using TF1.2 and Python 3.5 (udocker image tensorflow/tensorflow:1.2.0-gpu-py3). I have got the same error.

Last, I have tried to compile that file (the one in pointnet++, not in JSNet) using TF1.2 and Python 2.7 (udocker image tensorflow/tensorflow:1.2.0-gpu) and it works. Maybe the problem is the python version. However, it is not suitable for working with JSNet, since it uses Python 3.5 and TF1.4.

What am I doing wrong? Do I have to modified any file in the JSNet repository?

@dlinzhao
Copy link
Owner

@Daniel22L Maybe you should update the path of Tensorflow in each tf_xxx_compile.sh.
You can try to modify $HOME/anaconda3/envs/tensorflow_1.4/lib/python3.5/site-packages/tensorflow to /usr/local/lib/python3.5/dist-packages/tensorflow or other correct path.

g++ -std=c++11 tf_interpolate.cpp \
-o tf_interpolate_so.so \
-shared \
-fPIC \
-I$HOME/anaconda3/envs/tensorflow_1.4/lib/python3.5/site-packages/tensorflow/include \
-I/usr/local/cuda-8.0/include \
-I$HOME/anaconda3/envs/tensorflow_1.4/lib/python3.5/site-packages/tensorflow/include/external/nsync/public \
-lcudart \
-L/usr/local/cuda-8.0/lib64/ \
-L$HOME/anaconda3/envs/tensorflow_1.4/lib/python3.5/site-packages/tensorflow \
-ltensorflow_framework -O2 -D_GLIBCXX_USE_CXX11_ABI=0

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

3 participants