Closed aiyanxiao closed 5 years ago
/bin/sh: 1: :/usr/local/cuda-9.0/bin/nvcc: not found Looks like your cuda is not correctly configured
/bin/sh: 1: :/usr/local/cuda-9.0/bin/nvcc: not found Looks like your cuda is not correctly configured
but,my nvcc has been installed correctly: nvcc --version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2017 NVIDIA Corporation Built on Fri_Sep__1_21:08:03_CDT_2017 Cuda compilation tools, release 9.0, V9.0.176
Not sure what happened. But it's definitely a problem with cuda and nvcc. Maybe your cuda or nvcc is not installed exactly in this path /usr/local/cuda-9.0/bin/nvcc. Also please check ninja version, I'm using ninja 1.8.2, and have not tested on other versions. An alternative choice, you can abandon building this repo, instead, you can replace all synchronized batch norm layer with the default batch norm layer in PyTorch.
@aiyanxiao Did you solve this problem?
@aiyanxiao @celabi check this: gedit ~/.bashrc --> export CUDA_HOME=/usr/local/cuda As my experience you might have one more : here, similar like this "export CUDA_HOME=:/usr/local/cuda".
Alternative: cat :/usr/local/cuda-9.0/bin/nvcc You will find it does not exist. :P
RuntimeError: Error building extension 'enclib_gpu': [1/4] :/usr/local/cuda-9.0/bin/nvcc -DTORCH_EXTENSION_NAME=enclib_gpu -I/home/ayx/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include -I/home/ayx/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include/TH -I/home/ayx/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include/THC -I:/usr/local/cuda-9.0/include -I/home/ayx/anaconda3/envs/pytorch/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 --compiler-options '-fPIC' -std=c++11 -c /home/ayx/ShelfNet-citys/encoding/lib/gpu/encoding_kernel.cu -o encoding_kernel.cuda.o FAILED: encoding_kernel.cuda.o :/usr/local/cuda-9.0/bin/nvcc -DTORCH_EXTENSION_NAME=enclib_gpu -I/home/ayx/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include -I/home/ayx/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include/TH -I/home/ayx/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include/THC -I:/usr/local/cuda-9.0/include -I/home/ayx/anaconda3/envs/pytorch/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 --compiler-options '-fPIC' -std=c++11 -c /home/ayx/ShelfNet-citys/encoding/lib/gpu/encoding_kernel.cu -o encoding_kernel.cuda.o /bin/sh: 1: :/usr/local/cuda-9.0/bin/nvcc: not found [2/4] :/usr/local/cuda-9.0/bin/nvcc -DTORCH_EXTENSION_NAME=enclib_gpu -I/home/ayx/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include -I/home/ayx/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include/TH -I/home/ayx/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include/THC -I:/usr/local/cuda-9.0/include -I/home/ayx/anaconda3/envs/pytorch/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 --compiler-options '-fPIC' -std=c++11 -c /home/ayx/ShelfNet-citys/encoding/lib/gpu/syncbn_kernel.cu -o syncbn_kernel.cuda.o FAILED: syncbn_kernel.cuda.o :/usr/local/cuda-9.0/bin/nvcc -DTORCH_EXTENSION_NAME=enclib_gpu -I/home/ayx/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include -I/home/ayx/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include/TH -I/home/ayx/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include/THC -I:/usr/local/cuda-9.0/include -I/home/ayx/anaconda3/envs/pytorch/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 --compiler-options '-fPIC' -std=c++11 -c /home/ayx/ShelfNet-citys/encoding/lib/gpu/syncbn_kernel.cu -o syncbn_kernel.cuda.o /bin/sh: 1: :/usr/local/cuda-9.0/bin/nvcc: not found [3/4] :/usr/local/cuda-9.0/bin/nvcc -DTORCH_EXTENSION_NAME=enclib_gpu -I/home/ayx/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include -I/home/ayx/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include/TH -I/home/ayx/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include/THC -I:/usr/local/cuda-9.0/include -I/home/ayx/anaconda3/envs/pytorch/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 --compiler-options '-fPIC' -std=c++11 -c /home/ayx/ShelfNet-citys/encoding/lib/gpu/roi_align_kernel.cu -o roi_align_kernel.cuda.o FAILED: roi_align_kernel.cuda.o :/usr/local/cuda-9.0/bin/nvcc -DTORCH_EXTENSION_NAME=enclib_gpu -I/home/ayx/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include -I/home/ayx/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include/TH -I/home/ayx/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include/THC -I:/usr/local/cuda-9.0/include -I/home/ayx/anaconda3/envs/pytorch/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 --compiler-options '-fPIC' -std=c++11 -c /home/ayx/ShelfNet-citys/encoding/lib/gpu/roi_align_kernel.cu -o roi_align_kernel.cuda.o /bin/sh: 1: :/usr/local/cuda-9.0/bin/nvcc: not found ninja: build stopped: subcommand failed.