question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to install spconv

See original GitHub issue

Hello. I am unable to spconv1.0. I followed the instructions here https://github.com/traveller59/spconv/issues/152#issue-631745341 This is what I did:

Following is the output I get:

running bdist_wheel
running build
running build_py
running build_ext
/home/sarim/PycharmProjects/trajectory_prediction/spconv_8da6f96/build/lib.linux-x86_64-3.7
Release
-- Caffe2: CUDA detected: 10.0
-- Caffe2: CUDA nvcc is: /usr/local/cuda-10.0/bin/nvcc
-- Caffe2: CUDA toolkit directory: /usr/local/cuda-10.0
-- Caffe2: Header version is: 10.0
-- Found cuDNN: v7.4.2  (include: /usr/local/cuda-10.0/include, library: /usr/local/cuda-10.0/lib64/libcudnn.so)
-- Autodetected CUDA architecture(s):  6.1
-- Added CUDA NVCC flags for: -gencode;arch=compute_61,code=sm_61
CMake Warning (dev) at /snap/cmake/487/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
  The package name passed to `find_package_handle_standard_args` (torch) does
  not match the name of the calling package (Torch).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:122 (find_package_handle_standard_args)
  CMakeLists.txt:23 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- pybind11 v2.5.0
-- Configuring done
CMake Warning (dev) in src/spconv/CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "spconv".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in src/spconv/CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "spconv".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in src/utils/CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "spconv_nms".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in src/utils/CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "spconv_nms".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /home/sarim/PycharmProjects/trajectory_prediction/spconv_8da6f96/build/temp.linux-x86_64-3.7
[ 15%] Built target spconv_nms
[ 30%] Built target spconv_utils
[ 38%] Building CXX object src/spconv/CMakeFiles/spconv.dir/all.cc.o
[ 46%] Building CUDA object src/spconv/CMakeFiles/spconv.dir/indice.cu.o
[ 53%] Building CXX object src/spconv/CMakeFiles/spconv.dir/reordering.cc.o
/bin/sh: 1: home/sarim/PycharmProjects/trajectory_prediction/spconv_8da6f96-10.0/bin/nvcc: not found
src/spconv/CMakeFiles/spconv.dir/build.make:107: recipe for target 'src/spconv/CMakeFiles/spconv.dir/indice.cu.o' failed
make[2]: *** [src/spconv/CMakeFiles/spconv.dir/indice.cu.o] Error 127
make[2]: *** Waiting for unfinished jobs....
[ 61%] Building CUDA object src/spconv/CMakeFiles/spconv.dir/reordering.cu.o
/bin/sh: 1: home/sarim/PycharmProjects/trajectory_prediction/spconv_8da6f96-10.0/bin/nvcc: not found
src/spconv/CMakeFiles/spconv.dir/build.make:133: recipe for target 'src/spconv/CMakeFiles/spconv.dir/reordering.cu.o' failed
make[2]: *** [src/spconv/CMakeFiles/spconv.dir/reordering.cu.o] Error 127
/home/sarim/PycharmProjects/trajectory_prediction/spconv_8da6f96/src/spconv/all.cc:20:91: error: no matching function for call to ‘torch::jit::RegisterOperators::RegisterOperators(const char [28], <unresolved overloaded function type>)’
     torch::jit::RegisterOperators("spconv::get_indice_pairs_2d", &spconv::getIndicePair<2>)
                                                                                           ^
In file included from /home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/torch/include/torch/script.h:6:0,
                 from /home/sarim/PycharmProjects/trajectory_prediction/spconv_8da6f96/include/spconv/pool_ops.h:20,
                 from /home/sarim/PycharmProjects/trajectory_prediction/spconv_8da6f96/src/spconv/all.cc:16:
/home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/torch/include/torch/csrc/jit/custom_operator.h:20:3: note: candidate: torch::jit::RegisterOperators::RegisterOperators(std::vector<torch::jit::Operator>)
   RegisterOperators(std::vector<Operator> operators) {
   ^~~~~~~~~~~~~~~~~
/home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/torch/include/torch/csrc/jit/custom_operator.h:20:3: note:   candidate expects 1 argument, 2 provided
/home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/torch/include/torch/csrc/jit/custom_operator.h:17:3: note: candidate: constexpr torch::jit::RegisterOperators::RegisterOperators()
   RegisterOperators() = default;
   ^~~~~~~~~~~~~~~~~
/home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/torch/include/torch/csrc/jit/custom_operator.h:17:3: note:   candidate expects 0 arguments, 2 provided
/home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/torch/include/torch/csrc/jit/custom_operator.h:16:18: note: candidate: constexpr torch::jit::RegisterOperators::RegisterOperators(const torch::jit::RegisterOperators&)
 struct TORCH_API RegisterOperators {
                  ^~~~~~~~~~~~~~~~~
/home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/torch/include/torch/csrc/jit/custom_operator.h:16:18: note:   candidate expects 1 argument, 2 provided
/home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/torch/include/torch/csrc/jit/custom_operator.h:16:18: note: candidate: constexpr torch::jit::RegisterOperators::RegisterOperators(torch::jit::RegisterOperators&&)
/home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/torch/include/torch/csrc/jit/custom_operator.h:16:18: note:   candidate expects 1 argument, 2 provided
src/spconv/CMakeFiles/spconv.dir/build.make:81: recipe for target 'src/spconv/CMakeFiles/spconv.dir/all.cc.o' failed
make[2]: *** [src/spconv/CMakeFiles/spconv.dir/all.cc.o] Error 1
CMakeFiles/Makefile2:156: recipe for target 'src/spconv/CMakeFiles/spconv.dir/all' failed
make[1]: *** [src/spconv/CMakeFiles/spconv.dir/all] Error 2
Makefile:148: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
  File "setup.py", line 123, in <module>
    zip_safe=False,
  File "/home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/setuptools/__init__.py", line 165, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 223, in run
    self.run_command('build')
  File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.7/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "setup.py", line 39, in run
    self.build_extension(ext)
  File "setup.py", line 107, in build_extension
    subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp)
  File "/usr/lib/python3.7/subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j4']' returned non-zero exit status 2.
(venv) sarim@sarim-Inspiron-15-7000-Gaming:~/PycharmProjects/trajectory_prediction/spconv_8da6f96$ CUDA_ROOT=home/sarim/PycharmProjects/trajectory_prediction/spconv_8da6f96 python setup.py bdist_wheel
running bdist_wheel
running build
running build_py
running build_ext
/home/sarim/PycharmProjects/trajectory_prediction/spconv_8da6f96/build/lib.linux-x86_64-3.7
Release
-- Caffe2: CUDA detected: 10.0
-- Caffe2: CUDA nvcc is: /usr/local/cuda-10.0/bin/nvcc
-- Caffe2: CUDA toolkit directory: /usr/local/cuda-10.0
-- Caffe2: Header version is: 10.0
-- Found cuDNN: v7.4.2  (include: /usr/local/cuda-10.0/include, library: /usr/local/cuda-10.0/lib64/libcudnn.so)
-- Autodetected CUDA architecture(s):  6.1
-- Added CUDA NVCC flags for: -gencode;arch=compute_61,code=sm_61
CMake Warning (dev) at /snap/cmake/487/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
  The package name passed to `find_package_handle_standard_args` (torch) does
  not match the name of the calling package (Torch).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:122 (find_package_handle_standard_args)
  CMakeLists.txt:23 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- pybind11 v2.5.0
-- Configuring done
CMake Warning (dev) in src/spconv/CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "spconv".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in src/spconv/CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "spconv".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in src/utils/CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "spconv_nms".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in src/utils/CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "spconv_nms".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /home/sarim/PycharmProjects/trajectory_prediction/spconv_8da6f96/build/temp.linux-x86_64-3.7
Traceback (most recent call last):
  File "setup.py", line 123, in <module>
    zip_safe=False,
  File "/home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/setuptools/__init__.py", line 165, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 223, in run
    self.run_command('build')
  File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.7/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "setup.py", line 39, in run
    self.build_extension(ext)
  File "setup.py", line 76, in build_extension
    newText = f.read().replace('/usr/local/cuda', env['CUDA_BIN_DIR'])
KeyError: 'CUDA_BIN_DIR'
(venv) sarim@sarim-Inspiron-15-7000-Gaming:~/PycharmProjects/trajectory_prediction/spconv_8da6f96$ CUDA_ROOT=home/sarim/PycharmProjects/trajectory_prediction/spconv_8da6f96 python setup.py bdist_wheel
running bdist_wheel
running build
running build_py
running build_ext
/home/sarim/PycharmProjects/trajectory_prediction/spconv_8da6f96/build/lib.linux-x86_64-3.7
Release
-- Caffe2: CUDA detected: 10.0
-- Caffe2: CUDA nvcc is: /usr/local/cuda-10.0/bin/nvcc
-- Caffe2: CUDA toolkit directory: /usr/local/cuda-10.0
-- Caffe2: Header version is: 10.0
-- Found cuDNN: v7.4.2  (include: /usr/local/cuda-10.0/include, library: /usr/local/cuda-10.0/lib64/libcudnn.so)
-- Autodetected CUDA architecture(s):  6.1
-- Added CUDA NVCC flags for: -gencode;arch=compute_61,code=sm_61
CMake Warning (dev) at /snap/cmake/487/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
  The package name passed to `find_package_handle_standard_args` (torch) does
  not match the name of the calling package (Torch).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:122 (find_package_handle_standard_args)
  CMakeLists.txt:23 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- pybind11 v2.5.0
-- Configuring done
CMake Warning (dev) in src/spconv/CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "spconv".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in src/spconv/CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "spconv".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in src/utils/CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "spconv_nms".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in src/utils/CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "spconv_nms".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /home/sarim/PycharmProjects/trajectory_prediction/spconv_8da6f96/build/temp.linux-x86_64-3.7
[ 15%] Built target spconv_nms
[ 23%] Building CUDA object src/spconv/CMakeFiles/spconv.dir/indice.cu.o
[ 30%] Building CUDA object src/spconv/CMakeFiles/spconv.dir/reordering.cu.o
[ 38%] Building CXX object src/spconv/CMakeFiles/spconv.dir/all.cc.o
/bin/sh: 1: home/sarim/PycharmProjects/trajectory_prediction/spconv_8da6f96-10.0/bin/nvcc: not found
[ 53%] Built target spconv_utils
/bin/sh: 1: home/sarim/PycharmProjects/trajectory_prediction/spconv_8da6f96-10.0/bin/nvcc: not found
src/spconv/CMakeFiles/spconv.dir/build.make:107: recipe for target 'src/spconv/CMakeFiles/spconv.dir/indice.cu.o' failed
make[2]: *** [src/spconv/CMakeFiles/spconv.dir/indice.cu.o] Error 127
make[2]: *** Waiting for unfinished jobs....
src/spconv/CMakeFiles/spconv.dir/build.make:133: recipe for target 'src/spconv/CMakeFiles/spconv.dir/reordering.cu.o' failed
make[2]: *** [src/spconv/CMakeFiles/spconv.dir/reordering.cu.o] Error 127
/home/sarim/PycharmProjects/trajectory_prediction/spconv_8da6f96/src/spconv/all.cc:20:91: error: no matching function for call to ‘torch::jit::RegisterOperators::RegisterOperators(const char [28], <unresolved overloaded function type>)’
     torch::jit::RegisterOperators("spconv::get_indice_pairs_2d", &spconv::getIndicePair<2>)
                                                                                           ^
In file included from /home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/torch/include/torch/script.h:6:0,
                 from /home/sarim/PycharmProjects/trajectory_prediction/spconv_8da6f96/include/spconv/pool_ops.h:20,
                 from /home/sarim/PycharmProjects/trajectory_prediction/spconv_8da6f96/src/spconv/all.cc:16:
/home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/torch/include/torch/csrc/jit/custom_operator.h:20:3: note: candidate: torch::jit::RegisterOperators::RegisterOperators(std::vector<torch::jit::Operator>)
   RegisterOperators(std::vector<Operator> operators) {
   ^~~~~~~~~~~~~~~~~
/home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/torch/include/torch/csrc/jit/custom_operator.h:20:3: note:   candidate expects 1 argument, 2 provided
/home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/torch/include/torch/csrc/jit/custom_operator.h:17:3: note: candidate: constexpr torch::jit::RegisterOperators::RegisterOperators()
   RegisterOperators() = default;
   ^~~~~~~~~~~~~~~~~
/home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/torch/include/torch/csrc/jit/custom_operator.h:17:3: note:   candidate expects 0 arguments, 2 provided
/home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/torch/include/torch/csrc/jit/custom_operator.h:16:18: note: candidate: constexpr torch::jit::RegisterOperators::RegisterOperators(const torch::jit::RegisterOperators&)
 struct TORCH_API RegisterOperators {
                  ^~~~~~~~~~~~~~~~~
/home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/torch/include/torch/csrc/jit/custom_operator.h:16:18: note:   candidate expects 1 argument, 2 provided
/home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/torch/include/torch/csrc/jit/custom_operator.h:16:18: note: candidate: constexpr torch::jit::RegisterOperators::RegisterOperators(torch::jit::RegisterOperators&&)
/home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/torch/include/torch/csrc/jit/custom_operator.h:16:18: note:   candidate expects 1 argument, 2 provided
src/spconv/CMakeFiles/spconv.dir/build.make:81: recipe for target 'src/spconv/CMakeFiles/spconv.dir/all.cc.o' failed
make[2]: *** [src/spconv/CMakeFiles/spconv.dir/all.cc.o] Error 1
CMakeFiles/Makefile2:156: recipe for target 'src/spconv/CMakeFiles/spconv.dir/all' failed
make[1]: *** [src/spconv/CMakeFiles/spconv.dir/all] Error 2
Makefile:148: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
  File "setup.py", line 123, in <module>
    zip_safe=False,
  File "/home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/setuptools/__init__.py", line 165, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 223, in run
    self.run_command('build')
  File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.7/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "setup.py", line 39, in run
    self.build_extension(ext)
  File "setup.py", line 107, in build_extension
    subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp)
  File "/usr/lib/python3.7/subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j4']' returned non-zero exit status 2.
(venv) sarim@sarim-Inspiron-15-7000-Gaming:~/PycharmProjects/trajectory_prediction/spconv_8da6f96$ CUDA_ROOT=home/sarim/PycharmProjects/trajectory_prediction/spconv_8da6f96 python setup.py bdist_wheel
running bdist_wheel
running build
running build_py
running build_ext
/home/sarim/PycharmProjects/trajectory_prediction/spconv_8da6f96/build/lib.linux-x86_64-3.7
Release
-- Caffe2: CUDA detected: 10.0
-- Caffe2: CUDA nvcc is: /usr/local/cuda-10.0/bin/nvcc
-- Caffe2: CUDA toolkit directory: /usr/local/cuda-10.0
-- Caffe2: Header version is: 10.0
-- Found cuDNN: v7.4.2  (include: /usr/local/cuda-10.0/include, library: /usr/local/cuda-10.0/lib64/libcudnn.so)
-- Autodetected CUDA architecture(s):  6.1
-- Added CUDA NVCC flags for: -gencode;arch=compute_61,code=sm_61
CMake Warning (dev) at /snap/cmake/487/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
  The package name passed to `find_package_handle_standard_args` (torch) does
  not match the name of the calling package (Torch).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:122 (find_package_handle_standard_args)
  CMakeLists.txt:23 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- pybind11 v2.5.0
-- Configuring done
CMake Warning (dev) in src/spconv/CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "spconv".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in src/spconv/CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "spconv".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in src/utils/CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "spconv_nms".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in src/utils/CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "spconv_nms".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /home/sarim/PycharmProjects/trajectory_prediction/spconv_8da6f96/build/temp.linux-x86_64-3.7
[ 15%] Built target spconv_nms
[ 30%] Built target spconv_utils
[ 38%] Building CXX object src/spconv/CMakeFiles/spconv.dir/all.cc.o
[ 46%] Building CUDA object src/spconv/CMakeFiles/spconv.dir/reordering.cu.o
[ 53%] Building CUDA object src/spconv/CMakeFiles/spconv.dir/indice.cu.o
/bin/sh: 1: home/sarim/PycharmProjects/trajectory_prediction/spconv_8da6f96-10.0/bin/nvcc: not found
/bin/sh: 1: home/sarim/PycharmProjects/trajectory_prediction/spconv_8da6f96-10.0/bin/nvcc: not found
src/spconv/CMakeFiles/spconv.dir/build.make:107: recipe for target 'src/spconv/CMakeFiles/spconv.dir/indice.cu.o' failed
make[2]: *** [src/spconv/CMakeFiles/spconv.dir/indice.cu.o] Error 127
make[2]: *** Waiting for unfinished jobs....
src/spconv/CMakeFiles/spconv.dir/build.make:133: recipe for target 'src/spconv/CMakeFiles/spconv.dir/reordering.cu.o' failed
make[2]: *** [src/spconv/CMakeFiles/spconv.dir/reordering.cu.o] Error 127
[ 61%] Building CXX object src/spconv/CMakeFiles/spconv.dir/maxpool.cc.o
/home/sarim/PycharmProjects/trajectory_prediction/spconv_8da6f96/src/spconv/all.cc:20:91: error: no matching function for call to ‘torch::jit::RegisterOperators::RegisterOperators(const char [28], <unresolved overloaded function type>)’
     torch::jit::RegisterOperators("spconv::get_indice_pairs_2d", &spconv::getIndicePair<2>)
                                                                                           ^
In file included from /home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/torch/include/torch/script.h:6:0,
                 from /home/sarim/PycharmProjects/trajectory_prediction/spconv_8da6f96/include/spconv/pool_ops.h:20,
                 from /home/sarim/PycharmProjects/trajectory_prediction/spconv_8da6f96/src/spconv/all.cc:16:
/home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/torch/include/torch/csrc/jit/custom_operator.h:20:3: note: candidate: torch::jit::RegisterOperators::RegisterOperators(std::vector<torch::jit::Operator>)
   RegisterOperators(std::vector<Operator> operators) {
   ^~~~~~~~~~~~~~~~~
/home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/torch/include/torch/csrc/jit/custom_operator.h:20:3: note:   candidate expects 1 argument, 2 provided
/home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/torch/include/torch/csrc/jit/custom_operator.h:17:3: note: candidate: constexpr torch::jit::RegisterOperators::RegisterOperators()
   RegisterOperators() = default;
   ^~~~~~~~~~~~~~~~~
/home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/torch/include/torch/csrc/jit/custom_operator.h:17:3: note:   candidate expects 0 arguments, 2 provided
/home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/torch/include/torch/csrc/jit/custom_operator.h:16:18: note: candidate: constexpr torch::jit::RegisterOperators::RegisterOperators(const torch::jit::RegisterOperators&)
 struct TORCH_API RegisterOperators {
                  ^~~~~~~~~~~~~~~~~
/home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/torch/include/torch/csrc/jit/custom_operator.h:16:18: note:   candidate expects 1 argument, 2 provided
/home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/torch/include/torch/csrc/jit/custom_operator.h:16:18: note: candidate: constexpr torch::jit::RegisterOperators::RegisterOperators(torch::jit::RegisterOperators&&)
/home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/torch/include/torch/csrc/jit/custom_operator.h:16:18: note:   candidate expects 1 argument, 2 provided
src/spconv/CMakeFiles/spconv.dir/build.make:81: recipe for target 'src/spconv/CMakeFiles/spconv.dir/all.cc.o' failed
make[2]: *** [src/spconv/CMakeFiles/spconv.dir/all.cc.o] Error 1
CMakeFiles/Makefile2:156: recipe for target 'src/spconv/CMakeFiles/spconv.dir/all' failed
make[1]: *** [src/spconv/CMakeFiles/spconv.dir/all] Error 2
Makefile:148: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
  File "setup.py", line 97, in <module>
    zip_safe=False,
  File "/home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/setuptools/__init__.py", line 165, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/sarim/PycharmProjects/trajectory_prediction/venv/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 223, in run
    self.run_command('build')
  File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.7/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "setup.py", line 39, in run
    self.build_extension(ext)
  File "setup.py", line 81, in build_extension
    subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp)
  File "/usr/lib/python3.7/subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j4']' returned non-zero exit status 2.

My boost version is 1.73 and cuda is 10.0 and my make is 3.18.0 Please tell me how to fix this. Thanks

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
MartinHahnercommented, Jul 28, 2020

Are you using a conda environment?

If yes, did you run conda install cudnn as described in https://github.com/traveller59/spconv/issues/152#issue-631745341 ? If no, you should consider using conda.

0reactions
MartinHahnercommented, Apr 9, 2021

The script says -- Autodetected CUDA architecture(s): 6.1 which does not correspond to your output of cat /usr/local/cuda-10.0/include/cudnn.h | grep CUDNN_MAJOR -A 2

I don’t know how to fix it though.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to install spconv · Issue #206 - GitHub
Hello. I am unable to spconv1.0. I followed the instructions here #152 (comment) This is what I did: Opened venv in PyCharm git...
Read more >
spconv installation error - Shin, Donghoon - Medium
When pytorch version is 1.3+, spconv 1.2 should be installed. download spconv from github. $ git clone xxx.git — recursive. $ cd spconv....
Read more >
spconv-cu113 - PyPI
pip install spconv-cu113, pypi monthly download. CUDA 11.4, PyPI Version ... all weights are KRSC layout, some old model can't be loaded anymore....
Read more >
Installation — OpenCOOD 0.1 documentation
Go to https://pytorch.org/ to install pytorch cuda version. 3. Spconv (1.2.1 requred) . OpenCOOD currently uses the old spconv version to generate...
Read more >
ImportError on spconv - python - Stack Overflow
I have successfully installed spconv and even tested it with: ... line 16, in <module> from spconv import spconv_utils ImportError: cannot ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found