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

Fatal error: cuda/cuda_config.h #12

Open
JohnnieXDU opened this issue Oct 17, 2017 · 5 comments
Open

Fatal error: cuda/cuda_config.h #12

JohnnieXDU opened this issue Oct 17, 2017 · 5 comments

Comments

@JohnnieXDU
Copy link

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

@MatthewD1993
Copy link

you have to use tensorflow 1.2.1.

@cubeye
Copy link

cubeye commented Nov 1, 2017

@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.

@JohnnieXDU
Copy link
Author

Thanks, finally I fix this by using TF 1.2.1 @MatthewD1993 @cubeye

@qiufan
Copy link

qiufan commented Mar 12, 2018

@cubeye Thank you very much~~

@LiuzhuForFun
Copy link

thanks!

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

5 participants