flownet2-tf
flownet2-tf copied to clipboard
Fatal error: cuda/cuda_config.h
Hello, I'm appreciate your work!! But when I replicate your code, I have met a error: fatal error: cuda/cuda_config.h: No such file or directory, while I run 'make all'.
How could I fix the issue? Thanks!
Besides, the details of error are listed bellow.
In file included from /home/server109/anaconda2/lib/python2.7/site-packages/tensorflow/include/tensorflow/core/platform/default/stream_executor.h:26:0, from /home/server109/anaconda2/lib/python2.7/site-packages/tensorflow/include/tensorflow/core/platform/stream_executor.h:24, from /home/server109/anaconda2/lib/python2.7/site-packages/tensorflow/include/tensorflow/core/util/cuda_kernel_helper.h:26, from src/ops/preprocessing/kernels/data_augmentation.cu.cc:7: /home/server109/anaconda2/lib/python2.7/site-packages/tensorflow/include/tensorflow/stream_executor/dso_loader.h:32:30: fatal error: cuda/cuda_config.h: No such file or directory compilation terminated. Makefile:62: recipe for target 'preprocessing' failed make: *** [preprocessing] Error 1 make: *** Waiting for unfinished jobs.... In file included from /home/server109/anaconda2/lib/python2.7/site-packages/tensorflow/include/tensorflow/core/platform/default/stream_executor.h:26:0, from /home/server109/anaconda2/lib/python2.7/site-packages/tensorflow/include/tensorflow/core/platform/stream_executor.h:24, from /home/server109/anaconda2/lib/python2.7/site-packages/tensorflow/include/tensorflow/core/util/cuda_kernel_helper.h:26, from src/ops/flow_warp/flow_warp.cu.cc:13: /home/server109/anaconda2/lib/python2.7/site-packages/tensorflow/include/tensorflow/stream_executor/dso_loader.h:32:30: fatal error: cuda/cuda_config.h: No such file or directory compilation terminated. Makefile:77: recipe for target 'flowwarp' failed make: *** [flowwarp] Error 1 In file included from /home/server109/anaconda2/lib/python2.7/site-packages/tensorflow/include/tensorflow/core/platform/default/stream_executor.h:26:0, from /home/server109/anaconda2/lib/python2.7/site-packages/tensorflow/include/tensorflow/core/platform/stream_executor.h:24, from /home/server109/anaconda2/lib/python2.7/site-packages/tensorflow/include/tensorflow/core/util/cuda_kernel_helper.h:26, from src/ops/downsample/downsample_kernel_gpu.cu.cc:13: /home/server109/anaconda2/lib/python2.7/site-packages/tensorflow/include/tensorflow/stream_executor/dso_loader.h:32:30: fatal error: cuda/cuda_config.h: No such file or directory compilation terminated. Makefile:67: recipe for target 'downsample' failed make: *** [downsample] Error 1 In file included from /home/server109/anaconda2/lib/python2.7/site-packages/tensorflow/include/tensorflow/core/platform/default/stream_executor.h:26:0, from /home/server109/anaconda2/lib/python2.7/site-packages/tensorflow/include/tensorflow/core/platform/stream_executor.h:24, from /home/server109/anaconda2/lib/python2.7/site-packages/tensorflow/include/tensorflow/core/util/cuda_kernel_helper.h:26, from src/ops/correlation/correlation_kernel.cu.cc:16: /home/server109/anaconda2/lib/python2.7/site-packages/tensorflow/include/tensorflow/stream_executor/dso_loader.h:32:30: fatal error: cuda/cuda_config.h: No such file or directory compilation terminated. Makefile:71: recipe for target 'correlation' failed make: *** [correlation] Error 1
you have to use tensorflow 1.2.1.
@JohnnieXDU If you installed your tensorflow r1.3 from source, you could copy cuda_config.h to your python dist-packages,
sudo cp tensorflow/third_party/toolchains/gpus/cuda/cuda/cuda_config.h /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/stream_executor/cuda/
then you may still have the following compilation issues:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/util/cuda_kernel_helper.h(620): error: identifier "__shfl" is undefined /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/util/cuda_kernel_helper.h(640): error: identifier "__shfl_up" is undefined /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/util/cuda_kernel_helper.h(660): error: identifier "__shfl_down" is undefined /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/util/cuda_kernel_helper.h(680): error: identifier "__shfl_xor" is undefined
The solution is to add the following compiler flags back to the Makefile GPUCFLAGS = -c -gencode=arch=compute_30,code=sm_30
This worked on my machine.
Thanks, finally I fix this by using TF 1.2.1 @MatthewD1993 @cubeye
@cubeye Thank you very much~~
thanks!