mit-han-lab/pvcnn

RuntimeError: Error building extension '_pvcnn_backend':

fengyu019 opened this issue · 3 comments

RuntimeError: Error building extension 'pvcnn_backend': [1/14] /usr/local/cuda/bin/nvcc -DTORCH_EXTENSION_NAME=pvcnn_backend -DTORCH_API_INCLUDE_EXTENSION_H -isystem /root/miniconda3/envs/fengyu/lib/python3.7/site-packages/torch/include -isystem /root/miniconda3/envs/fengyu/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -isystem /root/miniconda3/envs/fengyu/lib/python3.7/site-packages/torch/include/TH -isystem /root/miniconda3/envs/fengyu/lib/python3.7/site-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /root/miniconda3/envs/fengyu/include/python3.7m -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_70,code=sm_70 --compiler-options '-fPIC' --compiler-bindir=/usr/bin/gcc-8 -std=c++14 -c /workspace/PVD/modules/functional/src/ball_query/ball_query.cu -o ball_query.cuda.o
FAILED: ball_query.cuda.o
/usr/local/cuda/bin/nvcc -DTORCH_EXTENSION_NAME=pvcnn_backend -DTORCH_API_INCLUDE_EXTENSION_H -isystem /root/miniconda3/envs/fengyu/lib/python3.7/site-packages/torch/include -isystem /root/miniconda3/envs/fengyu/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -isystem /root/miniconda3/envs/fengyu/lib/python3.7/site-packages/torch/include/TH -isystem /root/miniconda3/envs/fengyu/lib/python3.7/site-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /root/miniconda3/envs/fengyu/include/python3.7m -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS_ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_70,code=sm_70 --compiler-options '-fPIC' --compiler-bindir=/usr/bin/gcc-8 -std=c++14 -c /workspace/PVD/modules/functional/src/ball_query/ball_query.cu -o ball_query.cuda.o
/usr/bin/gcc-8: No such file or directory
[2/14] /usr/local/cuda/bin/nvcc -DTORCH_EXTENSION_NAME=pvcnn_backend -DTORCH_API_INCLUDE_EXTENSION_H -isystem /root/miniconda3/envs/fengyu/lib/python3.7/site-packages/torch/include -isystem /root/miniconda3/envs/fengyu/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -isystem /root/miniconda3/envs/fengyu/lib/python3.7/site-packages/torch/include/TH -isystem /root/miniconda3/envs/fengyu/lib/python3.7/site-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /root/miniconda3/envs/fengyu/include/python3.7m -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS_ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_70,code=sm_70 --compiler-options '-fPIC' --compiler-bindir=/usr/bin/gcc-8 -std=c++14 -c /workspace/PVD/modules/functional/src/grouping/grouping.cu -o grouping.cuda.o
FAILED: grouping.cuda.o
/usr/local/cuda/bin/nvcc -DTORCH_EXTENSION_NAME=pvcnn_backend -DTORCH_API_INCLUDE_EXTENSION_H -isystem /root/miniconda3/envs/fengyu/lib/python3.7/site-packages/torch/include -isystem /root/miniconda3/envs/fengyu/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -isystem /root/miniconda3/envs/fengyu/lib/python3.7/site-packages/torch/include/TH -isystem /root/miniconda3/envs/fengyu/lib/python3.7/site-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /root/miniconda3/envs/fengyu/include/python3.7m -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS_ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_70,code=sm_70 --compiler-options '-fPIC' --compiler-bindir=/usr/bin/gcc-8 -std=c++14 -c /workspace/PVD/modules/functional/src/grouping/grouping.cu -o grouping.cuda.o
/usr/bin/gcc-8: No such file or directory

In my experiment, a problem related to 'pvcnn_backend' occur and the information is above.
My environment is:
Ubuntu18.0
gcc7.5.0
cuda10.2
pytorch1.5.0
So why '/usr/bin/gcc-8: No such file or directory' occur?

You need to double-check whether you have gcc installed and whether its version is correct.

You need to double-check whether you have gcc installed and whether its version is correct.

I solve my problem by changing '/usr/bin/gcc-7' to '/usr/bin/gcc-8.
But I'm still full of doubts. I pulled the 10.2-cudnn7-devel-ubuntu18.04 image from docker hub. The default gcc version of this system is 7.5.0. Before that, I used another docker image. After I upgraded to gcc9 in the default gcc4 image (gcc -v shows the version as gcc9). But it still reports that the /usr/bin/gcc-8 folder does not exist, so I think the default access path of the source code is may set to gcc-8.

This is probably because the environment variable CC is not correctly set. I'm closing this issue for now.