Open iPrayerr opened 5 years ago
same to me, how to solve this problem? I've already spent three days on this - -......
Me too. Anybody tell me why,and who solved this problem??
Add a line in the 'set_up.py': sources = [os.path.join(extensions_dir, s) for s in sources] include_dirs = [extensions_dir] include_dirs.append('/usr/local/cuda/include') #I added this line ext_modules = [ extension( "_ext", sources, include_dirs=include_dirs, define_macros=define_macros, extra_compile_args=extra_compile_args, ) ]
Add a line in the 'set_up.py': sources = [os.path.join(extensions_dir, s) for s in sources] include_dirs = [extensions_dir] include_dirs.append('/usr/local/cuda/include') #I added this line ext_modules = [ extension( "_ext", sources, include_dirs=include_dirs, define_macros=define_macros, extra_compile_args=extra_compile_args, ) ] it work!!
i have solve it by input "export CUDA_HOME=/usr/local/cuda-xxxx" in anaconda env.
Hey, I've tried everything to run your make.sh Still I have the same problem: fatal error: cuda_runtime_api.h: No such file or directory
The specific traceback is as follows:
running build running build_ext building '_ext' extension gcc -pthread -B /home/ryluo/anaconda3/envs/pytorch/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/data/zp/EDVR-master/codes/models/modules/DCNv2/src -I/home/ryluo/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include -I/home/ryluo/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/ryluo/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/TH -I/home/ryluo/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda-9.0::/usr/local/cuda-9.0/include -I/home/ryluo/anaconda3/envs/pytorch/include/python3.6m -c /data/zp/EDVR-master/codes/models/modules/DCNv2/src/vision.cpp -o build/temp.linux-x86_64-3.6/data/zp/EDVR-master/codes/models/modules/DCNv2/src/vision.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ gcc -pthread -B /home/ryluo/anaconda3/envs/pytorch/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/data/zp/EDVR-master/codes/models/modules/DCNv2/src -I/home/ryluo/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include -I/home/ryluo/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/ryluo/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/TH -I/home/ryluo/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda-9.0::/usr/local/cuda-9.0/include -I/home/ryluo/anaconda3/envs/pytorch/include/python3.6m -c /data/zp/EDVR-master/codes/models/modules/DCNv2/src/cpu/dcn_v2_cpu.cpp -o build/temp.linux-x86_64-3.6/data/zp/EDVR-master/codes/models/modules/DCNv2/src/cpu/dcn_v2_cpu.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ In file included from /home/ryluo/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/ATen/cuda/CUDAContext.h:5:0, from /data/zp/EDVR-master/codes/models/modules/DCNv2/src/cpu/dcn_v2_cpu.cpp:4: /home/ryluo/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/include/c10/cuda/CUDAStream.h:6:30: fatal error: cuda_runtime_api.h: No such file or directory compilation terminated. error: command 'gcc' failed with exit status 1
So what exactly happened? I've tried setting my environment variable, or exporting it again in my single terminal, etc. I've checked my ~/.bashrc, no problem found there. I ran it in Anaconda3.