tiny-cuda-nn icon indicating copy to clipboard operation
tiny-cuda-nn copied to clipboard

pip install: RuntimeError: Error compiling objects for extension

Open Miaosheng1 opened this issue 2 years ago • 6 comments

when i install nerfstudio, it need the tiny cuda as requirement. So I install the tiny cuda as instructions as >https://docs.nerf.studio/en/latest/quickstart/installation.html But I found this error : #RuntimeError: Error compiling objects for extension# Did anybody have the same problem?

Miaosheng1 avatar Dec 27 '22 15:12 Miaosheng1

Have your running: "cmake . -B build" ?

zhangqianhui avatar Dec 28 '22 06:12 zhangqianhui

I followed instructions from nerfstudio as well, I used

pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch

Rather than running cmake directly. I think this is the relevant section of the build output (assuming I have the same issue as the original poster)

  × Running setup.py install for tinycudann did not run successfully.
  │ exit code: 1
  ╰─> [191 lines of output]
      Building PyTorch extension for tiny-cuda-nn version 1.7
      Obtained compute capability 86 from PyTorch
      running install
      /home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      running egg_info
      writing tinycudann.egg-info/PKG-INFO
      writing dependency_links to tinycudann.egg-info/dependency_links.txt
      writing top-level names to tinycudann.egg-info/top_level.txt
      reading manifest file 'tinycudann.egg-info/SOURCES.txt'
      writing manifest file 'tinycudann.egg-info/SOURCES.txt'
      running build_ext
      /home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/utils/cpp_extension.py:387: UserWarning: The detected CUDA version (11.5) has a minor version mismatch with the version that was used to compile PyTorch (11.7). Most likely this shouldn't be a problem.
        warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
      building 'tinycudann_bindings_86._C' extension
      Emitting ninja build file /tmp/pip-req-build-1z9n_unj/bindings/torch/build/temp.linux-x86_64-cpython-310/build.ninja...
      Compiling objects...
      Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
      [1/7] /usr/bin/nvcc  -I/tmp/pip-req-build-1z9n_unj/include -I/tmp/pip-req-build-1z9n_unj/dependencies -I/tmp/pip-req-build-1z9n_unj/dependencies/cutlass/include -I/tmp/pip-req-build-1z9n_unj/dependencies/cutlass/tools/util/include -I/tmp/pip-req-build-1z9n_unj/dependencies/fmt/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/TH -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/THC -I/home/rrssll/code/nerfstudio/.venv/include -I/usr/include/python3.10 -c -c /tmp/pip-req-build-1z9n_unj/src/common_device.cu -o /tmp/pip-req-build-1z9n_unj/bindings/torch/src/common_device.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'"'"'' -std=c++14 --extended-lambda --expt-relaxed-constexpr -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -Xcompiler=-mf16c -Xcompiler=-Wno-float-conversion -Xcompiler=-fno-strict-aliasing -DTCNN_MIN_GPU_ARCH=86 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0
      FAILED: /tmp/pip-req-build-1z9n_unj/bindings/torch/src/common_device.o
      /usr/bin/nvcc  -I/tmp/pip-req-build-1z9n_unj/include -I/tmp/pip-req-build-1z9n_unj/dependencies -I/tmp/pip-req-build-1z9n_unj/dependencies/cutlass/include -I/tmp/pip-req-build-1z9n_unj/dependencies/cutlass/tools/util/include -I/tmp/pip-req-build-1z9n_unj/dependencies/fmt/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/TH -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/THC -I/home/rrssll/code/nerfstudio/.venv/include -I/usr/include/python3.10 -c -c /tmp/pip-req-build-1z9n_unj/src/common_device.cu -o /tmp/pip-req-build-1z9n_unj/bindings/torch/src/common_device.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'"'"'' -std=c++14 --extended-lambda --expt-relaxed-constexpr -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -Xcompiler=-mf16c -Xcompiler=-Wno-float-conversion -Xcompiler=-fno-strict-aliasing -DTCNN_MIN_GPU_ARCH=86 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0
      /tmp/pip-req-build-1z9n_unj/dependencies/fmt/include/fmt/core.h(288): warning #1675-D: unrecognized GCC pragma

      /tmp/pip-req-build-1z9n_unj/dependencies/fmt/include/fmt/core.h(288): warning #1675-D: unrecognized GCC pragma

      /usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
        435 |         function(_Functor&& __f)
            |
                         ^
      /usr/include/c++/11/bits/std_function.h:435:145: note:         ‘_ArgTypes’
      /usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
        530 |         operator=(_Functor&& __f)
            |
                          ^
      /usr/include/c++/11/bits/std_function.h:530:146: note:         ‘_ArgTypes’
      [2/7] /usr/bin/nvcc  -I/tmp/pip-req-build-1z9n_unj/include -I/tmp/pip-req-build-1z9n_unj/dependencies -I/tmp/pip-req-build-1z9n_unj/dependencies/cutlass/include -I/tmp/pip-req-build-1z9n_unj/dependencies/cutlass/tools/util/include -I/tmp/pip-req-build-1z9n_unj/dependencies/fmt/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/TH -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/THC -I/home/rrssll/code/nerfstudio/.venv/include -I/usr/include/python3.10 -c -c /tmp/pip-req-build-1z9n_unj/src/common.cu -o /tmp/pip-req-build-1z9n_unj/bindings/torch/src/common.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'"'"'' -std=c++14 --extended-lambda --expt-relaxed-constexpr -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -Xcompiler=-mf16c -Xcompiler=-Wno-float-conversion -Xcompiler=-fno-strict-aliasing -DTCNN_MIN_GPU_ARCH=86 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0
      FAILED: /tmp/pip-req-build-1z9n_unj/bindings/torch/src/common.o
      /usr/bin/nvcc  -I/tmp/pip-req-build-1z9n_unj/include -I/tmp/pip-req-build-1z9n_unj/dependencies -I/tmp/pip-req-build-1z9n_unj/dependencies/cutlass/include -I/tmp/pip-req-build-1z9n_unj/dependencies/cutlass/tools/util/include -I/tmp/pip-req-build-1z9n_unj/dependencies/fmt/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/TH -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/THC -I/home/rrssll/code/nerfstudio/.venv/include -I/usr/include/python3.10 -c -c /tmp/pip-req-build-1z9n_unj/src/common.cu -o /tmp/pip-req-build-1z9n_unj/bindings/torch/src/common.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'"'"'' -std=c++14 --extended-lambda --expt-relaxed-constexpr -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -Xcompiler=-mf16c -Xcompiler=-Wno-float-conversion -Xcompiler=-fno-strict-aliasing -DTCNN_MIN_GPU_ARCH=86 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0
      /tmp/pip-req-build-1z9n_unj/dependencies/fmt/include/fmt/core.h(288): warning #1675-D: unrecognized GCC pragma

      /tmp/pip-req-build-1z9n_unj/dependencies/fmt/include/fmt/core.h(288): warning #1675-D: unrecognized GCC pragma

      /usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
        435 |         function(_Functor&& __f)
            |
                         ^
      /usr/include/c++/11/bits/std_function.h:435:145: note:         ‘_ArgTypes’
      /usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
        530 |         operator=(_Functor&& __f)
            |
                          ^
      /usr/include/c++/11/bits/std_function.h:530:146: note:         ‘_ArgTypes’
      [3/7] /usr/bin/nvcc  -I/tmp/pip-req-build-1z9n_unj/include -I/tmp/pip-req-build-1z9n_unj/dependencies -I/tmp/pip-req-build-1z9n_unj/dependencies/cutlass/include -I/tmp/pip-req-build-1z9n_unj/dependencies/cutlass/tools/util/include -I/tmp/pip-req-build-1z9n_unj/dependencies/fmt/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/TH -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/THC -I/home/rrssll/code/nerfstudio/.venv/include -I/usr/include/python3.10 -c -c /tmp/pip-req-build-1z9n_unj/src/network.cu -o /tmp/pip-req-build-1z9n_unj/bindings/torch/src/network.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'"'"'' -std=c++14 --extended-lambda --expt-relaxed-constexpr -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -Xcompiler=-mf16c -Xcompiler=-Wno-float-conversion -Xcompiler=-fno-strict-aliasing -DTCNN_MIN_GPU_ARCH=86 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0
      FAILED: /tmp/pip-req-build-1z9n_unj/bindings/torch/src/network.o
      /usr/bin/nvcc  -I/tmp/pip-req-build-1z9n_unj/include -I/tmp/pip-req-build-1z9n_unj/dependencies -I/tmp/pip-req-build-1z9n_unj/dependencies/cutlass/include -I/tmp/pip-req-build-1z9n_unj/dependencies/cutlass/tools/util/include -I/tmp/pip-req-build-1z9n_unj/dependencies/fmt/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/TH -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/THC -I/home/rrssll/code/nerfstudio/.venv/include -I/usr/include/python3.10 -c -c /tmp/pip-req-build-1z9n_unj/src/network.cu -o /tmp/pip-req-build-1z9n_unj/bindings/torch/src/network.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'"'"'' -std=c++14 --extended-lambda --expt-relaxed-constexpr -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -Xcompiler=-mf16c -Xcompiler=-Wno-float-conversion -Xcompiler=-fno-strict-aliasing -DTCNN_MIN_GPU_ARCH=86 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0
      /tmp/pip-req-build-1z9n_unj/dependencies/fmt/include/fmt/core.h(288): warning #1675-D: unrecognized GCC pragma

      /tmp/pip-req-build-1z9n_unj/dependencies/fmt/include/fmt/core.h(288): warning #1675-D: unrecognized GCC pragma

      /usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
        435 |         function(_Functor&& __f)
            |
                         ^
      /usr/include/c++/11/bits/std_function.h:435:145: note:         ‘_ArgTypes’
      /usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
        530 |         operator=(_Functor&& __f)
            |
                          ^
      /usr/include/c++/11/bits/std_function.h:530:146: note:         ‘_ArgTypes’
      [4/7] /usr/bin/nvcc  -I/tmp/pip-req-build-1z9n_unj/include -I/tmp/pip-req-build-1z9n_unj/dependencies -I/tmp/pip-req-build-1z9n_unj/dependencies/cutlass/include -I/tmp/pip-req-build-1z9n_unj/dependencies/cutlass/tools/util/include -I/tmp/pip-req-build-1z9n_unj/dependencies/fmt/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/TH -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/THC -I/home/rrssll/code/nerfstudio/.venv/include -I/usr/include/python3.10 -c -c /tmp/pip-req-build-1z9n_unj/src/cpp_api.cu -o /tmp/pip-req-build-1z9n_unj/bindings/torch/src/cpp_api.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'"'"'' -std=c++14 --extended-lambda --expt-relaxed-constexpr -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -Xcompiler=-mf16c -Xcompiler=-Wno-float-conversion -Xcompiler=-fno-strict-aliasing -DTCNN_MIN_GPU_ARCH=86 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0
      FAILED: /tmp/pip-req-build-1z9n_unj/bindings/torch/src/cpp_api.o
      /usr/bin/nvcc  -I/tmp/pip-req-build-1z9n_unj/include -I/tmp/pip-req-build-1z9n_unj/dependencies -I/tmp/pip-req-build-1z9n_unj/dependencies/cutlass/include -I/tmp/pip-req-build-1z9n_unj/dependencies/cutlass/tools/util/include -I/tmp/pip-req-build-1z9n_unj/dependencies/fmt/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/TH -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/THC -I/home/rrssll/code/nerfstudio/.venv/include -I/usr/include/python3.10 -c -c /tmp/pip-req-build-1z9n_unj/src/cpp_api.cu -o /tmp/pip-req-build-1z9n_unj/bindings/torch/src/cpp_api.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'"'"'' -std=c++14 --extended-lambda --expt-relaxed-constexpr -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -Xcompiler=-mf16c -Xcompiler=-Wno-float-conversion -Xcompiler=-fno-strict-aliasing -DTCNN_MIN_GPU_ARCH=86 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0
      /tmp/pip-req-build-1z9n_unj/dependencies/fmt/include/fmt/core.h(288): warning #1675-D: unrecognized GCC pragma

      /tmp/pip-req-build-1z9n_unj/dependencies/fmt/include/fmt/core.h(288): warning #1675-D: unrecognized GCC pragma

      /usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
        435 |         function(_Functor&& __f)
            |
                         ^
      /usr/include/c++/11/bits/std_function.h:435:145: note:         ‘_ArgTypes’
      /usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
        530 |         operator=(_Functor&& __f)
            |
                          ^
      /usr/include/c++/11/bits/std_function.h:530:146: note:         ‘_ArgTypes’
      [5/7] /usr/bin/nvcc  -I/tmp/pip-req-build-1z9n_unj/include -I/tmp/pip-req-build-1z9n_unj/dependencies -I/tmp/pip-req-build-1z9n_unj/dependencies/cutlass/include -I/tmp/pip-req-build-1z9n_unj/dependencies/cutlass/tools/util/include -I/tmp/pip-req-build-1z9n_unj/dependencies/fmt/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/TH -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/THC -I/home/rrssll/code/nerfstudio/.venv/include -I/usr/include/python3.10 -c -c /tmp/pip-req-build-1z9n_unj/src/encoding.cu -o /tmp/pip-req-build-1z9n_unj/bindings/torch/src/encoding.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'"'"'' -std=c++14 --extended-lambda --expt-relaxed-constexpr -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -Xcompiler=-mf16c -Xcompiler=-Wno-float-conversion -Xcompiler=-fno-strict-aliasing -DTCNN_MIN_GPU_ARCH=86 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0
      FAILED: /tmp/pip-req-build-1z9n_unj/bindings/torch/src/encoding.o
      /usr/bin/nvcc  -I/tmp/pip-req-build-1z9n_unj/include -I/tmp/pip-req-build-1z9n_unj/dependencies -I/tmp/pip-req-build-1z9n_unj/dependencies/cutlass/include -I/tmp/pip-req-build-1z9n_unj/dependencies/cutlass/tools/util/include -I/tmp/pip-req-build-1z9n_unj/dependencies/fmt/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/TH -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/THC -I/home/rrssll/code/nerfstudio/.venv/include -I/usr/include/python3.10 -c -c /tmp/pip-req-build-1z9n_unj/src/encoding.cu -o /tmp/pip-req-build-1z9n_unj/bindings/torch/src/encoding.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'"'"'' -std=c++14 --extended-lambda --expt-relaxed-constexpr -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -Xcompiler=-mf16c -Xcompiler=-Wno-float-conversion -Xcompiler=-fno-strict-aliasing -DTCNN_MIN_GPU_ARCH=86 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0
      /tmp/pip-req-build-1z9n_unj/dependencies/fmt/include/fmt/core.h(288): warning #1675-D: unrecognized GCC pragma

      /tmp/pip-req-build-1z9n_unj/dependencies/fmt/include/fmt/core.h(288): warning #1675-D: unrecognized GCC pragma

      /usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
        435 |         function(_Functor&& __f)
            |
                         ^
      /usr/include/c++/11/bits/std_function.h:435:145: note:         ‘_ArgTypes’
      /usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
        530 |         operator=(_Functor&& __f)
            |
                          ^
      /usr/include/c++/11/bits/std_function.h:530:146: note:         ‘_ArgTypes’
      [6/7] /usr/bin/nvcc  -I/tmp/pip-req-build-1z9n_unj/include -I/tmp/pip-req-build-1z9n_unj/dependencies -I/tmp/pip-req-build-1z9n_unj/dependencies/cutlass/include -I/tmp/pip-req-build-1z9n_unj/dependencies/cutlass/tools/util/include -I/tmp/pip-req-build-1z9n_unj/dependencies/fmt/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/TH -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/THC -I/home/rrssll/code/nerfstudio/.venv/include -I/usr/include/python3.10 -c -c /tmp/pip-req-build-1z9n_unj/src/cutlass_mlp.cu -o /tmp/pip-req-build-1z9n_unj/bindings/torch/src/cutlass_mlp.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'"'"'' -std=c++14 --extended-lambda --expt-relaxed-constexpr -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -Xcompiler=-mf16c -Xcompiler=-Wno-float-conversion -Xcompiler=-fno-strict-aliasing -DTCNN_MIN_GPU_ARCH=86 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0
      FAILED: /tmp/pip-req-build-1z9n_unj/bindings/torch/src/cutlass_mlp.o
      /usr/bin/nvcc  -I/tmp/pip-req-build-1z9n_unj/include -I/tmp/pip-req-build-1z9n_unj/dependencies -I/tmp/pip-req-build-1z9n_unj/dependencies/cutlass/include -I/tmp/pip-req-build-1z9n_unj/dependencies/cutlass/tools/util/include -I/tmp/pip-req-build-1z9n_unj/dependencies/fmt/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/TH -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/THC -I/home/rrssll/code/nerfstudio/.venv/include -I/usr/include/python3.10 -c -c /tmp/pip-req-build-1z9n_unj/src/cutlass_mlp.cu -o /tmp/pip-req-build-1z9n_unj/bindings/torch/src/cutlass_mlp.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'"'"'' -std=c++14 --extended-lambda --expt-relaxed-constexpr -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -Xcompiler=-mf16c -Xcompiler=-Wno-float-conversion -Xcompiler=-fno-strict-aliasing -DTCNN_MIN_GPU_ARCH=86 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0
      /tmp/pip-req-build-1z9n_unj/dependencies/fmt/include/fmt/core.h(288): warning #1675-D: unrecognized GCC pragma

      /tmp/pip-req-build-1z9n_unj/dependencies/fmt/include/fmt/core.h(288): warning #1675-D: unrecognized GCC pragma

      /usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
        435 |         function(_Functor&& __f)
            |
                         ^
      /usr/include/c++/11/bits/std_function.h:435:145: note:         ‘_ArgTypes’
      /usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
        530 |         operator=(_Functor&& __f)
            |
                          ^
      /usr/include/c++/11/bits/std_function.h:530:146: note:         ‘_ArgTypes’
      [7/7] /usr/bin/nvcc  -I/tmp/pip-req-build-1z9n_unj/include -I/tmp/pip-req-build-1z9n_unj/dependencies -I/tmp/pip-req-build-1z9n_unj/dependencies/cutlass/include -I/tmp/pip-req-build-1z9n_unj/dependencies/cutlass/tools/util/include -I/tmp/pip-req-build-1z9n_unj/dependencies/fmt/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/TH -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/THC -I/home/rrssll/code/nerfstudio/.venv/include -I/usr/include/python3.10 -c -c /tmp/pip-req-build-1z9n_unj/src/fully_fused_mlp.cu -o /tmp/pip-req-build-1z9n_unj/bindings/torch/src/fully_fused_mlp.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'"'"'' -std=c++14 --extended-lambda --expt-relaxed-constexpr -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -Xcompiler=-mf16c -Xcompiler=-Wno-float-conversion -Xcompiler=-fno-strict-aliasing -DTCNN_MIN_GPU_ARCH=86 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0
      FAILED: /tmp/pip-req-build-1z9n_unj/bindings/torch/src/fully_fused_mlp.o
      /usr/bin/nvcc  -I/tmp/pip-req-build-1z9n_unj/include -I/tmp/pip-req-build-1z9n_unj/dependencies -I/tmp/pip-req-build-1z9n_unj/dependencies/cutlass/include -I/tmp/pip-req-build-1z9n_unj/dependencies/cutlass/tools/util/include -I/tmp/pip-req-build-1z9n_unj/dependencies/fmt/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/TH -I/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/include/THC -I/home/rrssll/code/nerfstudio/.venv/include -I/usr/include/python3.10 -c -c /tmp/pip-req-build-1z9n_unj/src/fully_fused_mlp.cu -o /tmp/pip-req-build-1z9n_unj/bindings/torch/src/fully_fused_mlp.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'"'"'' -std=c++14 --extended-lambda --expt-relaxed-constexpr -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -Xcompiler=-mf16c -Xcompiler=-Wno-float-conversion -Xcompiler=-fno-strict-aliasing -DTCNN_MIN_GPU_ARCH=86 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0
      /tmp/pip-req-build-1z9n_unj/dependencies/fmt/include/fmt/core.h(288): warning #1675-D: unrecognized GCC pragma

      /tmp/pip-req-build-1z9n_unj/dependencies/fmt/include/fmt/core.h(288): warning #1675-D: unrecognized GCC pragma

      /usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
        435 |         function(_Functor&& __f)
            |
                         ^
      /usr/include/c++/11/bits/std_function.h:435:145: note:         ‘_ArgTypes’
      /usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
        530 |         operator=(_Functor&& __f)
            |
                          ^
      /usr/include/c++/11/bits/std_function.h:530:146: note:         ‘_ArgTypes’
      ninja: build stopped: subcommand failed.
      Traceback (most recent call last):
        File "/home/rrssll/code/nerfstudio/.venv/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1900, in _run_ninja_build
          subprocess.run(
        File "/usr/lib/python3.10/subprocess.py", line 524, in run
          raise CalledProcessError(retcode, process.args,
      subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

I've attached my complete log at build-results.txt.

robrussell avatar Jan 15 '23 01:01 robrussell

On Ubuntu 22.04. The gcc and g++ version that comes with it (gcc-11 and g++-11) will cause this error. Reverting to gcc-10 and g++10 solved this problem for me.

siatheindochinese avatar Mar 08 '23 03:03 siatheindochinese

Thanks @siatheindochinese . Did you have to change the system gcc/g++ versions permanently? Or did you use something like update-alternatives just for this installation?

robrussell avatar Mar 08 '23 22:03 robrussell

@robrussell sudo apt install gcc-10 g++-10 thensudo update-alternatives --config for gcc so I can change versions anytime.

siatheindochinese avatar Mar 09 '23 03:03 siatheindochinese

Thanks @siatheindochinese . Did you have to change the system gcc/g++ versions permanently? Or did you use something like update-alternatives just for this installation?

Hello, I wonder if installing gcc-10 can solve your problem. I encountered the same issue and have not been able to resolve it. I hope to receive your reply.