mit-han-lab / torchsparse

[MICRO'23, MLSys'22] TorchSparse: Efficient Training and Inference Framework for Sparse Convolution on GPUs.
https://torchsparse.mit.edu
MIT License
1.16k stars 132 forks source link

[Installation] <Failed building wheel> #238

Closed liu-jun-chen closed 9 months ago

liu-jun-chen commented 10 months ago

Is there an existing issue for this?

Have you followed all the steps in the FAQ?

Current Behavior

Hi, I am following the step to install torchsparse in my conda environment. Once, I succeeded but encounter error: ''AttributeError: module 'torchsparse.backend' has no attribute 'hash_cuda' '' when running the code. Thus, I followed the instruction: uninstalling the package and reinstalling it. But after that, I cannot install it successfully. I am not sure what problem it is. Could you help me?

Error Line

gcc: fatal error: cannot execute ���cc1plus���: execvp: No such file or directory compilation terminated. nvcc fatal : Failed to preprocess host compiler properties.

Environment

- GCC:9.5.0
- NVCC:11.6
- PyTorch:1.13.0+cu116
- PyTorch CUDA:11.6

Full Error Log

Error Log pip install --upgrade git+https://github.com/mit-han-lab/torchsparse.git Collecting git+https://github.com/mit-han-lab/torchsparse.git Cloning https://github.com/mit-han-lab/torchsparse.git to /tmp/pip-req-build-z456h60u Running command git clone --filter=blob:none --quiet https://github.com/mit-han-lab/torchsparse.git /tmp/pip-req-build-z456h60u Resolved https://github.com/mit-han-lab/torchsparse.git to commit b55506aa2524c8d69e3b6081a4fd404ffd072b4b Preparing metadata (setup.py) ... done Building wheels for collected packages: torchsparse Building wheel for torchsparse (setup.py) ... error error: subprocess-exited-with-error �� python setup.py bdist_wheel did not run successfully. ��� exit code: 1 ������> [171 lines of output] /home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/setuptools/dist.py:509: InformationOnly: Normalizing '2.0.0b' to '2.0.0b0' self.metadata.version = self._normalize_version( running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-cpython-38 creating build/lib.linux-x86_64-cpython-38/torchsparse copying torchsparse/operators.py -> build/lib.linux-x86_64-cpython-38/torchsparse copying torchsparse/backends.py -> build/lib.linux-x86_64-cpython-38/torchsparse copying torchsparse/__init__.py -> build/lib.linux-x86_64-cpython-38/torchsparse copying torchsparse/tensor.py -> build/lib.linux-x86_64-cpython-38/torchsparse copying torchsparse/version.py -> build/lib.linux-x86_64-cpython-38/torchsparse creating build/lib.linux-x86_64-cpython-38/torchsparse/backbones copying torchsparse/backbones/__init__.py -> build/lib.linux-x86_64-cpython-38/torchsparse/backbones copying torchsparse/backbones/resnet.py -> build/lib.linux-x86_64-cpython-38/torchsparse/backbones copying torchsparse/backbones/unet.py -> build/lib.linux-x86_64-cpython-38/torchsparse/backbones creating build/lib.linux-x86_64-cpython-38/torchsparse/utils copying torchsparse/utils/tune.py -> build/lib.linux-x86_64-cpython-38/torchsparse/utils copying torchsparse/utils/collate.py -> build/lib.linux-x86_64-cpython-38/torchsparse/utils copying torchsparse/utils/utils.py -> build/lib.linux-x86_64-cpython-38/torchsparse/utils copying torchsparse/utils/quantize.py -> build/lib.linux-x86_64-cpython-38/torchsparse/utils copying torchsparse/utils/__init__.py -> build/lib.linux-x86_64-cpython-38/torchsparse/utils creating build/lib.linux-x86_64-cpython-38/torchsparse/nn copying torchsparse/nn/__init__.py -> build/lib.linux-x86_64-cpython-38/torchsparse/nn creating build/lib.linux-x86_64-cpython-38/torchsparse/backbones/modules copying torchsparse/backbones/modules/blocks.py -> build/lib.linux-x86_64-cpython-38/torchsparse/backbones/modules copying torchsparse/backbones/modules/__init__.py -> build/lib.linux-x86_64-cpython-38/torchsparse/backbones/modules creating build/lib.linux-x86_64-cpython-38/torchsparse/nn/functional copying torchsparse/nn/functional/__init__.py -> build/lib.linux-x86_64-cpython-38/torchsparse/nn/functional copying torchsparse/nn/functional/query.py -> build/lib.linux-x86_64-cpython-38/torchsparse/nn/functional copying torchsparse/nn/functional/count.py -> build/lib.linux-x86_64-cpython-38/torchsparse/nn/functional copying torchsparse/nn/functional/build_kmap.py -> build/lib.linux-x86_64-cpython-38/torchsparse/nn/functional copying torchsparse/nn/functional/downsample.py -> build/lib.linux-x86_64-cpython-38/torchsparse/nn/functional copying torchsparse/nn/functional/hash.py -> build/lib.linux-x86_64-cpython-38/torchsparse/nn/functional copying torchsparse/nn/functional/pooling.py -> build/lib.linux-x86_64-cpython-38/torchsparse/nn/functional copying torchsparse/nn/functional/activation.py -> build/lib.linux-x86_64-cpython-38/torchsparse/nn/functional copying torchsparse/nn/functional/crop.py -> build/lib.linux-x86_64-cpython-38/torchsparse/nn/functional copying torchsparse/nn/functional/conv.py -> build/lib.linux-x86_64-cpython-38/torchsparse/nn/functional copying torchsparse/nn/functional/devoxelize.py -> build/lib.linux-x86_64-cpython-38/torchsparse/nn/functional copying torchsparse/nn/functional/voxelize.py -> build/lib.linux-x86_64-cpython-38/torchsparse/nn/functional creating build/lib.linux-x86_64-cpython-38/torchsparse/nn/modules copying torchsparse/nn/modules/conv.py -> build/lib.linux-x86_64-cpython-38/torchsparse/nn/modules copying torchsparse/nn/modules/crop.py -> build/lib.linux-x86_64-cpython-38/torchsparse/nn/modules copying torchsparse/nn/modules/pooling.py -> build/lib.linux-x86_64-cpython-38/torchsparse/nn/modules copying torchsparse/nn/modules/__init__.py -> build/lib.linux-x86_64-cpython-38/torchsparse/nn/modules copying torchsparse/nn/modules/bev.py -> build/lib.linux-x86_64-cpython-38/torchsparse/nn/modules copying torchsparse/nn/modules/norm.py -> build/lib.linux-x86_64-cpython-38/torchsparse/nn/modules copying torchsparse/nn/modules/activation.py -> build/lib.linux-x86_64-cpython-38/torchsparse/nn/modules creating build/lib.linux-x86_64-cpython-38/torchsparse/nn/utils copying torchsparse/nn/utils/kernel.py -> build/lib.linux-x86_64-cpython-38/torchsparse/nn/utils copying torchsparse/nn/utils/apply.py -> build/lib.linux-x86_64-cpython-38/torchsparse/nn/utils copying torchsparse/nn/utils/__init__.py -> build/lib.linux-x86_64-cpython-38/torchsparse/nn/utils running build_ext building 'torchsparse.backend' extension creating /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38 creating /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/torchsparse creating /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/torchsparse/backend creating /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/torchsparse/backend/convolution creating /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/torchsparse/backend/devoxelize creating /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/torchsparse/backend/hash creating /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/torchsparse/backend/hashmap creating /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/torchsparse/backend/others creating /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/torchsparse/backend/voxelize Emitting ninja build file /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/build.ninja... Compiling objects... Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) [1/17] /apps/local/cuda-11.6/bin/nvcc -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/TH -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/THC -I/apps/local/cuda-11.6/include -I/home/junchen.liu/.conda/envs/pointdr/include/python3.8 -c -c /tmp/pip-req-build-z456h60u/torchsparse/backend/hashmap/hashmap_cuda.cu -o /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/torchsparse/backend/hashmap/hashmap_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=backend -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14 FAILED: /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/torchsparse/backend/hashmap/hashmap_cuda.o /apps/local/cuda-11.6/bin/nvcc -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/TH -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/THC -I/apps/local/cuda-11.6/include -I/home/junchen.liu/.conda/envs/pointdr/include/python3.8 -c -c /tmp/pip-req-build-z456h60u/torchsparse/backend/hashmap/hashmap_cuda.cu -o /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/torchsparse/backend/hashmap/hashmap_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=backend -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14 gcc: fatal error: cannot execute ���cc1plus���: execvp: No such file or directory compilation terminated. nvcc fatal : Failed to preprocess host compiler properties. [2/17] /apps/local/cuda-11.6/bin/nvcc -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/TH -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/THC -I/apps/local/cuda-11.6/include -I/home/junchen.liu/.conda/envs/pointdr/include/python3.8 -c -c /tmp/pip-req-build-z456h60u/torchsparse/backend/convolution/convolution_cuda.cu -o /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/torchsparse/backend/convolution/convolution_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=backend -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14 FAILED: /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/torchsparse/backend/convolution/convolution_cuda.o /apps/local/cuda-11.6/bin/nvcc -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/TH -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/THC -I/apps/local/cuda-11.6/include -I/home/junchen.liu/.conda/envs/pointdr/include/python3.8 -c -c /tmp/pip-req-build-z456h60u/torchsparse/backend/convolution/convolution_cuda.cu -o /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/torchsparse/backend/convolution/convolution_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=backend -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14 gcc: fatal error: cannot execute ���cc1plus���: execvp: No such file or directory compilation terminated. nvcc fatal : Failed to preprocess host compiler properties. [3/17] /apps/local/cuda-11.6/bin/nvcc -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/TH -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/THC -I/apps/local/cuda-11.6/include -I/home/junchen.liu/.conda/envs/pointdr/include/python3.8 -c -c /tmp/pip-req-build-z456h60u/torchsparse/backend/devoxelize/devoxelize_cuda.cu -o /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/torchsparse/backend/devoxelize/devoxelize_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=backend -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14 FAILED: /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/torchsparse/backend/devoxelize/devoxelize_cuda.o /apps/local/cuda-11.6/bin/nvcc -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/TH -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/THC -I/apps/local/cuda-11.6/include -I/home/junchen.liu/.conda/envs/pointdr/include/python3.8 -c -c /tmp/pip-req-build-z456h60u/torchsparse/backend/devoxelize/devoxelize_cuda.cu -o /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/torchsparse/backend/devoxelize/devoxelize_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=backend -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14 gcc: fatal error: cannot execute ���cc1plus���: execvp: No such file or directory compilation terminated. nvcc fatal : Failed to preprocess host compiler properties. [4/17] /apps/local/cuda-11.6/bin/nvcc -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/TH -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/THC -I/apps/local/cuda-11.6/include -I/home/junchen.liu/.conda/envs/pointdr/include/python3.8 -c -c /tmp/pip-req-build-z456h60u/torchsparse/backend/hash/hash_cuda.cu -o /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/torchsparse/backend/hash/hash_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=backend -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14 FAILED: /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/torchsparse/backend/hash/hash_cuda.o /apps/local/cuda-11.6/bin/nvcc -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/TH -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/THC -I/apps/local/cuda-11.6/include -I/home/junchen.liu/.conda/envs/pointdr/include/python3.8 -c -c /tmp/pip-req-build-z456h60u/torchsparse/backend/hash/hash_cuda.cu -o /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/torchsparse/backend/hash/hash_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=backend -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14 gcc: fatal error: cannot execute ���cc1plus���: execvp: No such file or directory compilation terminated. nvcc fatal : Failed to preprocess host compiler properties. [5/17] /apps/local/cuda-11.6/bin/nvcc -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/TH -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/THC -I/apps/local/cuda-11.6/include -I/home/junchen.liu/.conda/envs/pointdr/include/python3.8 -c -c /tmp/pip-req-build-z456h60u/torchsparse/backend/others/count_cuda.cu -o /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/torchsparse/backend/others/count_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=backend -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14 FAILED: /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/torchsparse/backend/others/count_cuda.o /apps/local/cuda-11.6/bin/nvcc -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/TH -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/THC -I/apps/local/cuda-11.6/include -I/home/junchen.liu/.conda/envs/pointdr/include/python3.8 -c -c /tmp/pip-req-build-z456h60u/torchsparse/backend/others/count_cuda.cu -o /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/torchsparse/backend/others/count_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=backend -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14 gcc: fatal error: cannot execute ���cc1plus���: execvp: No such file or directory compilation terminated. nvcc fatal : Failed to preprocess host compiler properties. [6/17] c++ -MMD -MF /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/torchsparse/backend/hashmap/hashmap_cpu.o.d -pthread -B /home/junchen.liu/.conda/envs/pointdr/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/TH -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/THC -I/apps/local/cuda-11.6/include -I/home/junchen.liu/.conda/envs/pointdr/include/python3.8 -c -c /tmp/pip-req-build-z456h60u/torchsparse/backend/hashmap/hashmap_cpu.cpp -o /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/torchsparse/backend/hashmap/hashmap_cpu.o -g -O3 -fopenmp -lgomp -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=backend -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 cc1plus: warning: command-line option ���-Wstrict-prototypes��� is valid for C/ObjC but not for C++ [7/17] c++ -MMD -MF /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/torchsparse/backend/others/count_cpu.o.d -pthread -B /home/junchen.liu/.conda/envs/pointdr/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/TH -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/THC -I/apps/local/cuda-11.6/include -I/home/junchen.liu/.conda/envs/pointdr/include/python3.8 -c -c /tmp/pip-req-build-z456h60u/torchsparse/backend/others/count_cpu.cpp -o /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/torchsparse/backend/others/count_cpu.o -g -O3 -fopenmp -lgomp -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=backend -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 cc1plus: warning: command-line option ���-Wstrict-prototypes��� is valid for C/ObjC but not for C++ [8/17] c++ -MMD -MF /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/torchsparse/backend/devoxelize/devoxelize_cpu.o.d -pthread -B /home/junchen.liu/.conda/envs/pointdr/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/TH -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/THC -I/apps/local/cuda-11.6/include -I/home/junchen.liu/.conda/envs/pointdr/include/python3.8 -c -c /tmp/pip-req-build-z456h60u/torchsparse/backend/devoxelize/devoxelize_cpu.cpp -o /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/torchsparse/backend/devoxelize/devoxelize_cpu.o -g -O3 -fopenmp -lgomp -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=backend -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 cc1plus: warning: command-line option ���-Wstrict-prototypes��� is valid for C/ObjC but not for C++ [9/17] c++ -MMD -MF /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/torchsparse/backend/hash/hash_cpu.o.d -pthread -B /home/junchen.liu/.conda/envs/pointdr/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/TH -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/THC -I/apps/local/cuda-11.6/include -I/home/junchen.liu/.conda/envs/pointdr/include/python3.8 -c -c /tmp/pip-req-build-z456h60u/torchsparse/backend/hash/hash_cpu.cpp -o /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/torchsparse/backend/hash/hash_cpu.o -g -O3 -fopenmp -lgomp -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=backend -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 cc1plus: warning: command-line option ���-Wstrict-prototypes��� is valid for C/ObjC but not for C++ [10/17] c++ -MMD -MF /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/torchsparse/backend/convolution/convolution_cpu.o.d -pthread -B /home/junchen.liu/.conda/envs/pointdr/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/TH -I/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/include/THC -I/apps/local/cuda-11.6/include -I/home/junchen.liu/.conda/envs/pointdr/include/python3.8 -c -c /tmp/pip-req-build-z456h60u/torchsparse/backend/convolution/convolution_cpu.cpp -o /tmp/pip-req-build-z456h60u/build/temp.linux-x86_64-cpython-38/torchsparse/backend/convolution/convolution_cpu.o -g -O3 -fopenmp -lgomp -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=backend -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 cc1plus: warning: command-line option ���-Wstrict-prototypes��� is valid for C/ObjC but not for C++ ninja: build stopped: subcommand failed. Traceback (most recent call last): File "/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1900, in _run_ninja_build subprocess.run( File "/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/subprocess.py", line 516, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/tmp/pip-req-build-z456h60u/setup.py", line 30, in setup( File "/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/setuptools/__init__.py", line 107, in setup return distutils.core.setup(**attrs) File "/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185, in setup return run_commands(dist) File "/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201, in run_commands dist.run_commands() File "/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands self.run_command(cmd) File "/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/setuptools/dist.py", line 1234, in run_command super().run_command(command) File "/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 325, in run self.run_command("build") File "/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command self.distribution.run_command(command) File "/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/setuptools/dist.py", line 1234, in run_command super().run_command(command) File "/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/setuptools/_distutils/command/build.py", line 131, in run self.run_command(cmd_name) File "/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command self.distribution.run_command(command) File "/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/setuptools/dist.py", line 1234, in run_command super().run_command(command) File "/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 84, in run _build_ext.run(self) File "/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run self.build_extensions() File "/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 843, in build_extensions build_ext.build_extensions(self) File "/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions self._build_extensions_serial() File "/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial self.build_extension(ext) File "/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 246, in build_extension _build_ext.build_extension(self, ext) File "/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 548, in build_extension objects = self.compiler.compile( File "/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 658, in unix_wrap_ninja_compile _write_ninja_file_and_compile_objects( File "/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1573, in _write_ninja_file_and_compile_objects _run_ninja_build( File "/home/junchen.liu/.conda/envs/pointdr/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1916, in _run_ninja_build raise RuntimeError(message) from e RuntimeError: Error compiling objects for extension [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for torchsparse Running setup.py clean for torchsparse Failed to build torchsparse ERROR: Could not build wheels for torchsparse, which is required to install pyproject.toml-based projects
zhijian-liu commented 10 months ago

Could you install the latest version of TorchSparse by

python -c "$(curl -fsSL https://raw.githubusercontent.com/mit-han-lab/torchsparse/master/install.py)"
liu-jun-chen commented 10 months ago

Yeah, I think directly using pre-build wheel is convenient to install. Since version 2.1.0 has changed some definitions of functions, I prefer to install 2.0.0. But for my question, I also find the solution to that. After adding MAX_JOBS=2 in the front of the installation command, it works quite smoothly. I am not sure why it helps:).

zhijian-liu commented 9 months ago

Thank for letting us know!

andrewyguo commented 8 months ago

The following worked for me:


git checkout 2caf084 # to build version 2.0.0

sudo apt-get install libsparsehash-dev

MAX_JOBS=1 python setup.py install