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

Could you upgrade the lib to support tensorflow 1.4, cudnn 6.0 and cuda 8.0? #7

Open
John1231983 opened this issue Jan 3, 2018 · 4 comments

Comments

@John1231983
Copy link

Hello, the original implementation has supported the cudnn 6.0 and cuda 8.0. Could you upgrade your lib to support the cudnn 6.0 and cuda 8.0. Because I am running in Tensorflow 1.4, so it does not support the lower version of cudnn (i.e 5.0 as your current code). Thanks for the great lib
P.s: I have close previous issue in other project due to wrong location

@Zardinality
Copy link
Owner

@John1231983 Sorry, I do not have time to do the upgrade right now. If you know where the problems locate, feel free to start a pull request.

@John1231983
Copy link
Author

Thanks. The problem is that related to cuda.h. I checked in the tensorflow and noone can solve it in tensorflow 1.4. They only suggest downgrading to 1.2.1

/usr/local/lib/python3.5/dist-packages/tensorflow/include
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
In file included from deform_conv.cu.cc:70:0:
/usr/local/lib/python3.5/dist-packages/tensorflow/include/tensorflow/core/util/cuda_kernel_helper.h:24:31: fatal error: cuda/include/cuda.h: No such file or directory
 #include "cuda/include/cuda.h"
                               ^

@John1231983
Copy link
Author

Ok. Now I have succeeded to build in tensorflow 1.4 that install from pip3. This is my script, you can use it to update the README
nvcc file

TF_INC=$(python3 -c 'import tensorflow as tf; print(tf.sysconfig.get_include())')
echo $TF_INC
nvcc -std=c++11 -c -o deform_conv.cu.o deform_conv.cu.cc -I $TF_INC -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -L /usr/local/cuda-8.0/lib64/ -I /usr/local/ -I $TF_INC/external/nsync/public --expt-relaxed-constexpr -gencode arch=compute_52,code=sm_52

g++ file

TF_INC=$(python3 -c 'import tensorflow as tf; print(tf.sysconfig.get_include())')
TF_LIB=$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_lib())')
echo $TF_INC
if [ ! -f $TF_INC/tensorflow/stream_executor/cuda/cuda_config.h ]; then
    cp ./cuda_config.h $TF_INC/tensorflow/stream_executor/cuda/
fi
g++ -std=c++11 -shared -o deform_conv.so deform_conv.cc deform_conv.cu.o -I $TF_INC -fPIC -lcudart -L $CUDA_HOME/lib64 -D GOOGLE_CUDA=1 -Wfatal-errors -I $CUDA_HOME/include -D_GLIBCXX_USE_CXX11_ABI=0 -L$TF_LIB -ltensorflow_framework -I $TF_INC/external/nsync/public

@Zardinality
Copy link
Owner

@John1231983 Thank you for the efforts! Unfortunately, I have no permission to install CuDNN 6 on the machine I use, so I can not cross-test whether these scripts work on my machine and make an update. But I update the README mentioning this problem and referring to this 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

2 participants