Zardinality / TF_Deformable_Net

Deformable convolution net on Tensorflow
MIT License
169 stars 53 forks source link

Compile Error #24

Closed ccnankai closed 5 years ago

ccnankai commented 6 years ago

@leinxx @Zardinality @JiahuiYu At the beginning, these two errors appear. image

After changing the two header files, the following error occurs image This problem has puzzled me for a long time. Is there any suggestion? Thank you.

knmac commented 6 years ago

I think it's because your Tensorflow include the file cuda.h in this manner:

#include "cuda/include/cuda.h"

You can try to make the file visible by adding cuda/include in your LD_LIBRARY_PATH and include cuda.h instead.

For nsync_cv.h problem, try to use the flag -I $NSYNC_INC in g++ commands to include the path.

Also, it looks like you're using Python 2.7. I think it works better with Python 3

ccnankai commented 6 years ago

@knmac Thank you for your advice, I have solved the previous problem ,mainly the latter error :

4 errors detected in the compilation of "/tmp/tmpxft_00005a43_000000007_deform_psroi_pooling_op_gpu.cu.cpp1.ii". g++: error: deform_psroi_pooling_op.cu.o: No such file or directory

yfnn commented 5 years ago

Have you solved this issue?

ccnankai commented 5 years ago

@yfnn
I didn't solve this problem, can't find a solution

yfnn commented 5 years ago

那你实现可变形卷积了吗

YinZ-510 commented 5 years ago

I compiled successfully with gcc-4.9 and g++-4.9, no error.

YinZ-510 commented 5 years ago

Have you solved this issue? cd deform_psroi_pooling_layer nvcc -std=c++11 -ccbin=/usr/bin/g++-4.9 -c -o deform_psroi_pooling_op.cu.o deform_psroi_pooling_op_gpu.cu.cc \ -I $TF_INC -I $NSYNC_INC -I /usr/local -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -L /usr/local/cuda-8.0/lib64/ --expt-relaxed-constexpr -arch=$ARCH 把 -D GOOGLE_CUDA 换成 -L /usr/local/cuda-8.0/lib64/

yfnn commented 5 years ago

@YZ-510 I still have one issue as follows. g++: error: deform_conv.cu.o: No such file or directory

I use familiar command "nvcc -std=c++11 -ccbin=/usr/bin/g++-7 -c -o deform_conv.cu.o deform_conv.cu.cc" to solve the first issue, but there are some errors like this, In file included from deform_conv.cu.cc:68:0: deform_conv.h:66:10: fatal error: third_party/eigen3/unsupported/Eigen/CXX11/Tensor: No such file or directory

include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"

^~~~~~~~~~~ compilation terminated.

How can I solve this?

YinZ-510 commented 5 years ago

@yfnn It's my make.sh, I use gcc-4.9 and g++-4.9: nvcc -std=c++11 -ccbin=/usr/bin/g++-4.9 -c -o deform_conv.cu.o deform_conv.cu.cc -I $TF_INC -I $NSYNC_INC -I /usr/local -D\ GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -L /usr/local/cuda-8.0/lib64/ --expt-relaxed-constexpr -arch=$ARCH g++-4.9 -std=c++11 -shared -o deform_conv.so deform_conv.cc deform_conv.cu.o -I\ $TF_INC -I $NSYNC_INC -fPIC -lcudart -L $CUDA_HOME/lib64 -D GOOGLE_CUDA=1 -Wfatal-errors \ -I$CUDA_HOME/include -L $TF_LIB -ltensorflow_framework -D_GLIBCXX_USE_CXX11_ABI=0

aditipanda commented 5 years ago

/usr/local/lib/python2.7/dist-packages/tensorflow/include/google/protobuf/arena_impl.h(57): warning: integer conversion resulted in a change of sign

/usr/local/lib/python2.7/dist-packages/tensorflow/include/google/protobuf/arena_impl.h(304): warning: integer conversion resulted in a change of sign

/usr/local/lib/python2.7/dist-packages/tensorflow/include/google/protobuf/arena_impl.h(305): warning: integer conversion resulted in a change of sign

deform_psroi_pooling_op_gpu.cu.cc(172): warning: variable "transSize" was declared but never referenced

4 errors detected in the compilation of "/tmp/tmpxft_000028eb_00000000-7_deform_psroi_pooling_op_gpu.cu.cpp1.ii". g++: error: deform_psroi_pooling_op.cu.o: No such file or directory /usr/local/lib/python2.7/dist-packages/tensorflow/include/google/protobuf/arena_impl.h(57): warning: integer conversion resulted in a change of sign

Did anyone solve this? @ccnankai @yfnn @YZ-510

YinZ-510 commented 5 years ago

@appyfizzA nvcc -std=c++11 -ccbin=/usr/bin/g++-4.9 -c -o deform_psroi_pooling_op.cu.o deform_psroi_pooling_op_gpu.cu.cc -I $TF_INC -I $NSYNC_INC -I /usr/local -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -L /usr/local/cuda-8.0/lib64/ --expt-relaxed-constexpr -arch=$ARCH Replace -D GOOGLE_CUDA with -L /usr/local/cuda-8.0/lib64/

aditipanda commented 5 years ago

@appyfizzA nvcc -std=c++11 -ccbin=/usr/bin/g++-4.9 -c -o deform_psroi_pooling_op.cu.o deform_psroi_pooling_op_gpu.cu.cc -I $TF_INC -I $NSYNC_INC -I /usr/local -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -L /usr/local/cuda-8.0/lib64/ --expt-relaxed-constexpr -arch=$ARCH Replace -D GOOGLE_CUDA with -L /usr/local/cuda-8.0/lib64/

Thank you, it ran without error.