Open cubantonystark opened 10 months ago
Read the tinycudann requirements carefully. There is something going on with specific g++ and gcc versions. Try to use different versions with the update-alternatives command.
Hello @cubantonystark!
Just to clarify, did you run apt-get install nvidia-cuda-dev nvidia-cuda-toolkit -y
before installing tiny-cuda-nn?
That seems to have fixed the issue for me.
I'm unable to build tiny-cuda-nn and pytorch bindings under a conda environment. All previous lines succeed, when getting t this one:
pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch
The build process fails. I'm runnig WSL Ubuntu 22.04 with conda 23.7.4.
Please see below,
Collecting git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch Cloning https://github.com/NVlabs/tiny-cuda-nn/ to /tmp/pip-req-build-3zdcgbbw Running command git clone --filter=blob:none --quiet https://github.com/NVlabs/tiny-cuda-nn/ /tmp/pip-req-build-3zdcgbbw Resolved https://github.com/NVlabs/tiny-cuda-nn/ to commit c12645dfbac707ccd82907a209edff9b258f1e3d Running command git submodule update --init --recursive -q Preparing metadata (setup.py) ... done Building wheels for collected packages: tinycudann Building wheel for tinycudann (setup.py) ... error error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [159 lines of output] /tmp/pip-req-build-3zdcgbbw/bindings/torch/setup.py:5: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html from pkg_resources import parse_version Building PyTorch extension for tiny-cuda-nn version 1.7 Obtained compute capability 89 from PyTorch nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2023 NVIDIA Corporation Built on Tue_Feb7_19:32:13_PST_2023 Cuda compilation tools, release 12.1, V12.1.66 Build cuda_12.1.r12.1/compiler.32415258_0 Detected CUDA version 12.1 Targeting C++ standard 17 running bdist_wheel /home/reynel/anaconda3/envs/instant_angelo/lib/python3.9/site-packages/torch/utils/cpp_extension.py:502: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend. warnings.warn(msg.format('we could not find ninja.')) running build running build_py creating build creating build/lib.linux-x86_64-cpython-39 creating build/lib.linux-x86_64-cpython-39/tinycudann copying tinycudann/init.py -> build/lib.linux-x86_64-cpython-39/tinycudann copying tinycudann/modules.py -> build/lib.linux-x86_64-cpython-39/tinycudann running egg_info creating tinycudann.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 writing manifest file 'tinycudann.egg-info/SOURCES.txt' reading manifest file 'tinycudann.egg-info/SOURCES.txt' writing manifest file 'tinycudann.egg-info/SOURCES.txt' copying tinycudann/bindings.cpp -> build/lib.linux-x86_64-cpython-39/tinycudann running build_ext /home/reynel/anaconda3/envs/instant_angelo/lib/python3.9/site-packages/torch/utils/cpp_extension.py:424: UserWarning: There are no g++ version bounds defined for CUDA version 12.1 warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}') building 'tinycudann_bindings._89_C' extension creating dependencies creating dependencies/fmt creating dependencies/fmt/src creating src creating build/temp.linux-x86_64-cpython-39 creating build/temp.linux-x86_64-cpython-39/tinycudann gcc -pthread -B /home/reynel/anaconda3/envs/instant_angelo/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/reynel/anaconda3/envs/instant_angelo/include -I/home/reynel/anaconda3/envs/instant_angelo/include -fPIC -O2 -isystem /home/reynel/anaconda3/envs/instant_angelo/include -fPIC -I/tmp/pip-req-build-3zdcgbbw/include -I/tmp/pip-req-build-3zdcgbbw/dependencies -I/tmp/pip-req-build-3zdcgbbw/dependencies/cutlass/include -I/tmp/pip-req-build-3zdcgbbw/dependencies/cutlass/tools/util/include -I/tmp/pip-req-build-3zdcgbbw/dependencies/fmt/include -I/home/reynel/anaconda3/envs/instant_angelo/lib/python3.9/site-packages/torch/include -I/home/reynel/anaconda3/envs/instant_angelo/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/reynel/anaconda3/envs/instant_angelo/lib/python3.9/site-packages/torch/include/TH -I/home/reynel/anaconda3/envs/instant_angelo/lib/python3.9/site-packages/torch/include/THC -I/home/reynel/anaconda3/envs/instant_angelo/include -I/home/reynel/anaconda3/envs/instant_angelo/include/python3.9 -c ../../dependencies/fmt/src/format.cc -o build/temp.linux-x86_64-cpython-39/../../dependencies/fmt/src/format.o -std=c++17 -DTCNN_PARAMS_UNALIGNED -DTCNN_MIN_GPU_ARCH=89 -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=_89_C -D_GLIBCXX_USE_CXX11_ABI=0 gcc -pthread -B /home/reynel/anaconda3/envs/instant_angelo/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/reynel/anaconda3/envs/instant_angelo/include -I/home/reynel/anaconda3/envs/instant_angelo/include -fPIC -O2 -isystem /home/reynel/anaconda3/envs/instant_angelo/include -fPIC -I/tmp/pip-req-build-3zdcgbbw/include -I/tmp/pip-req-build-3zdcgbbw/dependencies -I/tmp/pip-req-build-3zdcgbbw/dependencies/cutlass/include -I/tmp/pip-req-build-3zdcgbbw/dependencies/cutlass/tools/util/include -I/tmp/pip-req-build-3zdcgbbw/dependencies/fmt/include -I/home/reynel/anaconda3/envs/instant_angelo/lib/python3.9/site-packages/torch/include -I/home/reynel/anaconda3/envs/instant_angelo/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/reynel/anaconda3/envs/instant_angelo/lib/python3.9/site-packages/torch/include/TH -I/home/reynel/anaconda3/envs/instant_angelo/lib/python3.9/site-packages/torch/include/THC -I/home/reynel/anaconda3/envs/instant_angelo/include -I/home/reynel/anaconda3/envs/instant_angelo/include/python3.9 -c ../../dependencies/fmt/src/os.cc -o build/temp.linux-x86_64-cpython-39/../../dependencies/fmt/src/os.o -std=c++17 -DTCNN_PARAMS_UNALIGNED -DTCNN_MIN_GPU_ARCH=89 -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=_89_C -D_GLIBCXX_USE_CXX11_ABI=0 /home/reynel/anaconda3/envs/instant_angelo/bin/nvcc -I/tmp/pip-req-build-3zdcgbbw/include -I/tmp/pip-req-build-3zdcgbbw/dependencies -I/tmp/pip-req-build-3zdcgbbw/dependencies/cutlass/include -I/tmp/pip-req-build-3zdcgbbw/dependencies/cutlass/tools/util/include -I/tmp/pip-req-build-3zdcgbbw/dependencies/fmt/include -I/home/reynel/anaconda3/envs/instant_angelo/lib/python3.9/site-packages/torch/include -I/home/reynel/anaconda3/envs/instant_angelo/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/reynel/anaconda3/envs/instant_angelo/lib/python3.9/site-packages/torch/include/TH -I/home/reynel/anaconda3/envs/instant_angelo/lib/python3.9/site-packages/torch/include/THC -I/home/reynel/anaconda3/envs/instant_angelo/include -I/home/reynel/anaconda3/envs/instant_angelo/include/python3.9 -c ../../src/common_host.cu -o build/temp.linux-x86_64-cpython-39/../../src/common_host.o -D__CUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options '-fPIC' -std=c++17 --extended-lambda --expt-relaxed-constexpr -UCUDA_NO_HALF_OPERATORS -UCUDA_NO_HALF_CONVERSIONS -UCUDA_NO_HALF2_OPERATORS -Xcompiler=-Wno-float-conversion -Xcompiler=-fno-strict-aliasing -gencode=arch=compute_89,code=compute_89 -gencode=arch=compute_89,code=sm_89 -DTCNN_PARAMS_UNALIGNED -DTCNN_MIN_GPU_ARCH=89 -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=_89_C -D_GLIBCXX_USE_CXX11_ABI=0 /tmp/pip-req-build-3zdcgbbw/dependencies/fmt/include/fmt/core.h(288): warning #1675-D: unrecognized GCC pragma
pragma GCC optimize("Og")
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for tinycudann Running setup.py clean for tinycudann Failed to build tinycudann ERROR: Could not build wheels for tinycudann, which is required to install pyproject.toml-based projects