Closed Northzhangmingzhe closed 5 years ago
Do you have an Nvidia GPU card and install the driver and the corresponding cuda
lib?
I have GPU and the driver, but I install pytorch 1.0.0 by conda
It seems like that it's caused by the wrong configuration of the environment variables like PATH
.
As a result, nvcc
can not be found correctly.
RuntimeError: Error building extension 'enclib_gpu': [1/3] :/usr/local/cuda-8.0:/root/cuda:/usr/local/cuda-9.0/bin/nvcc -DTORCH_EXTENSION_NAME=enclib_gpu -DTORCH_API_INCLUDE_EXTENSION_H -isystem /root/anaconda3/envs/fastFCN/lib/python3.5/site-packages/torch/lib/include -isystem /root/anaconda3/envs/fastFCN/lib/python3.5/site-packages/torch/lib/include/torch/csrc/api/include -isystem /root/anaconda3/envs/fastFCN/lib/python3.5/site-packages/torch/lib/include/TH -isystem /root/anaconda3/envs/fastFCN/lib/python3.5/site-packages/torch/lib/include/THC -isystem :/usr/local/cuda-8.0:/root/cuda:/usr/local/cuda-9.0/include -isystem /root/anaconda3/envs/fastFCN/include/python3.5m -D_GLIBCXX_USE_CXX11_ABI=0 -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --compiler-options '-fPIC' -std=c++11 -c /home/fastFCN/FastFCN/encoding/lib/gpu/encoding_kernel.cu -o encoding_kernel.cuda.o FAILED: encoding_kernel.cuda.o :/usr/local/cuda-8.0:/root/cuda:/usr/local/cuda-9.0/bin/nvcc -DTORCH_EXTENSION_NAME=enclib_gpu -DTORCH_API_INCLUDE_EXTENSION_H -isystem /root/anaconda3/envs/fastFCN/lib/python3.5/site-packages/torch/lib/include -isystem /root/anaconda3/envs/fastFCN/lib/python3.5/site-packages/torch/lib/include/torch/csrc/api/include -isystem /root/anaconda3/envs/fastFCN/lib/python3.5/site-packages/torch/lib/include/TH -isystem /root/anaconda3/envs/fastFCN/lib/python3.5/site-packages/torch/lib/include/THC -isystem :/usr/local/cuda-8.0:/root/cuda:/usr/local/cuda-9.0/include -isystem /root/anaconda3/envs/fastFCN/include/python3.5m -D_GLIBCXX_USE_CXX11_ABI=0 -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --compiler-options '-fPIC' -std=c++11 -c /home/fastFCN/FastFCN/encoding/lib/gpu/encoding_kernel.cu -o encoding_kernel.cuda.o /bin/sh: :/usr/local/cuda-8.0:/root/cuda:/usr/local/cuda-9.0/bin/nvcc: No such file or directory
how to solve this?