-
Notifications
You must be signed in to change notification settings - Fork 194
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
Issue compiling on Ubuntu and tensorflow 1.4 #28
Comments
Add a flag '--expt-relaxed-constexpr' when compiling with nvcc. here is my Makefile for tf1.4: OUT_DIR = ./build TF_INC = $(shell python -c 'import tensorflow as tf; print(tf.sysconfig.get_include())') GPUFLAGS = -I all: downsample.so flow_warp.so preprocessing.so correlation.so downsample_kernel_gpu.o: data_augmentation.o: correlation_kernel_gpu.o: clean: |
@zhouqixian |
@clarkren That issue is occurring because you need to add tabs to the lines beneath the ones with the colon (for example donwsample_kernel_gpu.o: ) @zhouqixian Even with this Makefile I am still receiving the error ""CUDACC_VER" is no longer supported" I am using tf1.7 Cuda9.0. I read that this issue was supposedly fixed a while back with TF. |
I finally make it work in TF 1.2 only. I could not make it run in TF 1.7 |
@oneTimePad It works for me when using tf1.4, cuda8.0 and cudnnV6. Actually, NVCC is a Cuda compiler and error maybe occurs when you use a higher version Cuda(Cuda 9.0) for this code. def get_pixel_value(img, x, y):
def tf_warp(img, flow, H, W):
|
Hi @zhouqixian, I have tried to use your Makefile (tf 1.4.1, cuda 8.0, cudnn v6 and python 3.5), Compile is successful, but in testing, I face the problem "correlation.so: undefined symbol:_ZTIN10tensorflow8OpKernelE", could you help me, please? Thank you in advance. |
I'm getting the same error as @shoutashi : "correlation.so: undefined symbol:_ZTIN10tensorflow8OpKernelE". Could you please help me with this? |
Hi, @shoutashi, @alisaaalehi , I'm facing the same problem |
Hey @dehaisea, in my case removing -D_GLIBCXX_USE_CXX11_ABI=0 from the Makefile and rebuilding the project fixed it. |
@shoutashi @alisaaalehi @dehaisea If tensorflow.sysconfig.get_lib() cannot get correct dir, manually link: Env: For more information: Here is my Makefile. I made some other changes to make it successfully. |
Hello @Iamanorange, I have tried your Makefile in Ubuntu 16.04, tensorflow 1.10.1, cuda 9.0, cudnn 7.3 and it work well! Thanks your help! |
i was facing the same issues: story:1- removing -D_GLIBCXX_USE_CXX11_ABI=0 can only work for gcc < 5.0.0 refrence: mgharbi/hdrnet_legacy#2 solution:switch to python 3 😄 this worked for me! |
After
After modifying the Makefile, I ran into another "undefined symbol" problem : tensorflow.python.framework.errors_impl.NotFoundError: /media/cds-iisc/DATA/Undertaker/ANT/testing/flownet2-tf-master/src/./ops/build/correlation.so: undefined symbol: _ZN10tensorflow8internal21CheckOpMessageBuilder9NewStringEv Any help ? |
I'am using Ubuntu 16.04, tensorflow 1.10.1, cuda 9.0, cudnn 7 |
and python 3.6.4 |
removing -D_GLIBCXX_USE_CXX11_ABI=0 solved the issue |
Hi @BibratRanjan, anything that you change will cause another problem. I've encountered lots of problems and my final and simple solution is this:
|
That work! Thanks |
Thank you so much for you Makeflie. After make all success. I ran python -m src.flownet2.test --input_a data/samples/0img0.ppm --input_b data/samples/0img1.ppm --out ./
During handling of the above exception, another exception occurred: Traceback (most recent call last):
Caused by op 'FlowNet2/FlowNetCSS/FlowNetCS/FlowNetC/Correlation', defined at: InvalidArgumentError (see above for traceback): No OpKernel was registered to support Op 'Correlation' with these attrs. Registered devices: [CPU], Registered kernels:
During handling of the above exception, another exception occurred: Traceback (most recent call last): No OpKernel was registered to support Op 'Correlation' with these attrs. Registered devices: [CPU], Registered kernels:
Env : cuda 9.0 cudnn9.0 tensorflow 1.10.0 Ubuntu 16.04 |
@mengyaaa Should run Flownet2 on GPU only. |
Thank you! This solved my compiling issue on Tensorflow 1.10.0 with CUDA 9.0. |
I use the Docker image of that version( tensorflow/tensorflow: 1.2.1-gpu) and successfully run the makefile, but I got some problems when I install the python-tk in the Docker container, I try to use " apt-get install python-tk " , it tells me that I have to run " apt-get update" , but it always stop at " 0% working" when I run "apt-get update" , Did you encounter the similar problem? |
TkInter (python-tk) is used to draw GUI. It is not necessary in this case. You can ignore it. |
Changing "-D_GLIBCXX_USE_CXX11_ABI=0" to "-D_GLIBCXX_USE_CXX11_ABI=1" worked for me. |
Dear all,
I have an issue trying to compile the code with tensorflow 1.4. I already solve the problem of cuda_config.h missing, looking at a solved issue.
Here is the output of make all:
make all nvcc -g -std=c++11 -I
python -c "import tensorflow; print(tensorflow.sysconfig.get_include())"` -I"/usr/local/cuda/include" -DGOOGLE_CUDA=1 -D_MWAITXINTRIN_H_INCLUDED -D_FORCE_INLINES -D__STRICT_ANSI__ -D_GLIBCXX_USE_CXX11_ABI=0 -c -gencode=arch=compute_30,code=sm_30 src/ops/preprocessing/kernels/data_augmentation.cu.cc -x cu -Xcompiler -fPIC -o src/ops/build/data_augmentation.o/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1265): warning: calling a constexpr host function("real") from a host device function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1265): warning: calling a constexpr host function("imag") from a host device function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1265): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1265): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1270): warning: calling a constexpr host function("real") from a host device function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1270): warning: calling a constexpr host function("imag") from a host device function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1270): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1270): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h(133): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h(138): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h(208): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h(213): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.
/usr/local/lib/python2.7/dist-packages/tensorflow/include/google/protobuf/arena_impl.h(52): warning: integer conversion resulted in a change of sign
/usr/local/lib/python2.7/dist-packages/tensorflow/include/google/protobuf/arena_impl.h(147): warning: integer conversion resulted in a change of sign
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/util/cuda_kernel_helper.h(572): error: calling a constexpr host function("real") from a device function("CudaAtomicSub") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/util/cuda_kernel_helper.h(572): error: calling a constexpr host function("imag") from a device function("CudaAtomicSub") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/util/cuda_kernel_helper.h(577): error: calling a constexpr host function("real") from a device function("CudaAtomicSub") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/util/cuda_kernel_helper.h(577): error: calling a constexpr host function("imag") from a device function("CudaAtomicSub") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.
4 errors detected in the compilation of "/tmp/tmpxft_000009d2_00000000-7_data_augmentation.cu.cpp1.ii".
Makefile:63: recipe for target 'preprocessing' failed
make: *** [preprocessing] Error 2`
The text was updated successfully, but these errors were encountered: