error installing tinycuda
I run the install command from nerfstudio page and the second command line goes wrong
pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch
I get the following error which is quite long:
Building PyTorch extension for tiny-cuda-nn version 1.7
Obtained compute capability 75 from PyTorch
running bdist_wheel
C:\Users\UserToto\Documents\MyLocalApps\Anaconda3\envs\nerfstudio\lib\site-packages\torch\utils\cpp_extension.py:411: 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.win-amd64-cpython-38
creating build\lib.win-amd64-cpython-38\tinycudann
copying tinycudann\modules.py -> build\lib.win-amd64-cpython-38\tinycudann
copying tinycudann\__init__.py -> build\lib.win-amd64-cpython-38\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.win-amd64-cpython-38\tinycudann
running build_ext
building 'tinycudann_bindings_75._C' extension
creating build\dependencies
creating build\dependencies\fmt
creating build\dependencies\fmt\src
creating build\src
creating build\temp.win-amd64-cpython-38
creating build\temp.win-amd64-cpython-38\Release
creating build\temp.win-amd64-cpython-38\Release\tinycudann
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\UserToto\AppData\Local\Temp\pip-req-build-s2124542/include -IC:\Users\UserToto\AppData\Local\Temp\pip-req-build-s2124542/dependencies -IC:\Users\UserToto\AppData\Local\Temp\pip-req-build-s2124542/dependencies/cutlass/include -IC:\Users\UserToto\AppData\Local\Temp\pip-req-build-s2124542/dependencies/cutlass/tools/util/include -IC:\Users\UserToto\AppData\Local\Temp\pip-req-build-s2124542/dependencies/fmt/include -IC:\Users\UserToto\Documents\MyLocalApps\Anaconda3\envs\nerfstudio\lib\site-packages\torch\include -IC:\Users\UserToto\Documents\MyLocalApps\Anaconda3\envs\nerfstudio\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\UserToto\Documents\MyLocalApps\Anaconda3\envs\nerfstudio\lib\site-packages\torch\include\TH -IC:\Users\UserToto\Documents\MyLocalApps\Anaconda3\envs\nerfstudio\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\include" -IC:\Users\UserToto\Documents\MyLocalApps\Anaconda3\envs\nerfstudio\include -IC:\Users\UserToto\Documents\MyLocalApps\Anaconda3\envs\nerfstudio\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /EHsc /Tp../../dependencies/fmt/src/format.cc /Fobuild\temp.win-amd64-cpython-38\Release\../../dependencies/fmt/src/format.obj /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /EHsc /std:c++14 -DTCNN_MIN_GPU_ARCH=75 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0
format.cc
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\UserToto\AppData\Local\Temp\pip-req-build-s2124542/include -IC:\Users\UserToto\AppData\Local\Temp\pip-req-build-s2124542/dependencies -IC:\Users\UserToto\AppData\Local\Temp\pip-req-build-s2124542/dependencies/cutlass/include -IC:\Users\UserToto\AppData\Local\Temp\pip-req-build-s2124542/dependencies/cutlass/tools/util/include -IC:\Users\UserToto\AppData\Local\Temp\pip-req-build-s2124542/dependencies/fmt/include -IC:\Users\UserToto\Documents\MyLocalApps\Anaconda3\envs\nerfstudio\lib\site-packages\torch\include -IC:\Users\UserToto\Documents\MyLocalApps\Anaconda3\envs\nerfstudio\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\UserToto\Documents\MyLocalApps\Anaconda3\envs\nerfstudio\lib\site-packages\torch\include\TH -IC:\Users\UserToto\Documents\MyLocalApps\Anaconda3\envs\nerfstudio\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\include" -IC:\Users\UserToto\Documents\MyLocalApps\Anaconda3\envs\nerfstudio\include -IC:\Users\UserToto\Documents\MyLocalApps\Anaconda3\envs\nerfstudio\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /EHsc /Tp../../dependencies/fmt/src/os.cc /Fobuild\temp.win-amd64-cpython-38\Release\../../dependencies/fmt/src/os.obj /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /EHsc /std:c++14 -DTCNN_MIN_GPU_ARCH=75 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0
os.cc
"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\bin\nvcc" -c ../../src/common.cu -o build\temp.win-amd64-cpython-38\Release\../../src/common.obj -IC:\Users\UserToto\AppData\Local\Temp\pip-req-build-s2124542/include -IC:\Users\UserToto\AppData\Local\Temp\pip-req-build-s2124542/dependencies -IC:\Users\UserToto\AppData\Local\Temp\pip-req-build-s2124542/dependencies/cutlass/include -IC:\Users\UserToto\AppData\Local\Temp\pip-req-build-s2124542/dependencies/cutlass/tools/util/include -IC:\Users\UserToto\AppData\Local\Temp\pip-req-build-s2124542/dependencies/fmt/include -IC:\Users\UserToto\Documents\MyLocalApps\Anaconda3\envs\nerfstudio\lib\site-packages\torch\include -IC:\Users\UserToto\Documents\MyLocalApps\Anaconda3\envs\nerfstudio\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\UserToto\Documents\MyLocalApps\Anaconda3\envs\nerfstudio\lib\site-packages\torch\include\TH -IC:\Users\UserToto\Documents\MyLocalApps\Anaconda3\envs\nerfstudio\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\include" -IC:\Users\UserToto\Documents\MyLocalApps\Anaconda3\envs\nerfstudio\include -IC:\Users\UserToto\Documents\MyLocalApps\Anaconda3\envs\nerfstudio\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcompiler /EHsc -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -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_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -DTCNN_MIN_GPU_ARCH=75 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 --use-local-env
clÿ: Ligne de commande warning D9025ÿ: substitution de '/D__CUDA_NO_HALF_OPERATORS__' par '/U__CUDA_NO_HALF_OPERATORS__'
clÿ: Ligne de commande warning D9025ÿ: substitution de '/D__CUDA_NO_HALF_CONVERSIONS__' par '/U__CUDA_NO_HALF_CONVERSIONS__'
clÿ: Ligne de commande warning D9025ÿ: substitution de '/D__CUDA_NO_HALF2_OPERATORS__' par '/U__CUDA_NO_HALF2_OPERATORS__'
common.cu
C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30133/include\xutility(1309): error: expected a "("
detected during instantiation of "void std::_Adl_verify_range(const _Iter &, const _Sentinel &) [with _Iter=const char *, _Sentinel=const char *]"
C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30133/include\xlocale(1990): here
....
C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30133/include\xutility(131): error: expected a "("
detected during:
instantiation of "void *std::_Voidify_iter(_Iter) [with _Iter=std::string *]"
C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30133/include\xmemory(714): here
instantiation of "void std::_Default_allocator_traits<_Alloc>::construct(_Alloc &, _Objty *, _Types &&...) [with _Alloc=std::allocator<std::string>, _Objty=std::string, _Types=<const char (&)[1]>]"
C:/Users/UserToto/AppData/Local/Temp/pip-req-build-s2124542/dependencies\json/json.hpp(18440): here
instantiation of "T *nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType>::create<T,Args...>(Args &&...) [with ObjectType=std::map, ArrayType=std::vector, StringType=std::string, BooleanType=__nv_bool, NumberIntegerType=int64_t, NumberUnsignedType=uint64_t, NumberFloatType=double, AllocatorType=std::allocator, JSONSerializer=nlohmann::adl_serializer, BinaryType=std::vector<uint8_t, std::allocator<uint8_t>>, T=std::string, Args=<const char (&)[1]>]"
C:/Users/UserToto/AppData/Local/Temp/pip-req-build-s2124542/dependencies\json/json.hpp(18523): here
instantiation of "nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType>::json_value::json_value(nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType>::value_t) [with ObjectType=std::map, ArrayType=std::vector, StringType=std::string, BooleanType=__nv_bool, NumberIntegerType=int64_t, NumberUnsignedType=uint64_t, NumberFloatType=double, AllocatorType=std::allocator, JSONSerializer=nlohmann::adl_serializer, BinaryType=std::vector<uint8_t, std::allocator<uint8_t>>]"
C:/Users/UserToto/AppData/Local/Temp/pip-req-build-s2124542/dependencies\json/json.hpp(18947): here
instantiation of "nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType>::basic_json(nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType>::value_t) [with ObjectType=std::map, ArrayType=std::vector, StringType=std::string, BooleanType=__nv_bool, NumberIntegerType=int64_t, NumberUnsignedType=uint64_t, NumberFloatType=double, AllocatorType=std::allocator, JSONSerializer=nlohmann::adl_serializer, BinaryType=std::vector<uint8_t, std::allocator<uint8_t>>]"
C:/Users/UserToto/AppData/Local/Temp/pip-req-build-s2124542/dependencies\json/json.hpp(18971): here
instantiation of "nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType>::basic_json(std::nullptr_t) [with ObjectType=std::map, ArrayType=std::vector, StringType=std::string, BooleanType=__nv_bool, NumberIntegerType=int64_t, NumberUnsignedType=uint64_t, NumberFloatType=double, AllocatorType=std::allocator, JSONSerializer=nlohmann::adl_serializer, BinaryType=std::vector<uint8_t, std::allocator<uint8_t>>]"
C:/Users/UserToto/AppData/Local/Temp/pip-req-build-s2124542/dependencies\json/json.hpp(24402): here
instantiation of "nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType> nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType>::parse(IteratorType, IteratorType, nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType>::parser_callback_t, __nv_bool, __nv_bool) [with ObjectType=std::map, ArrayType=std::vector, StringType=std::string, BooleanType=__nv_bool, NumberIntegerType=int64_t, NumberUnsignedType=uint64_t, NumberFloatType=double, AllocatorType=std::allocator, JSONSerializer=nlohmann::adl_serializer, BinaryType=std::vector<uint8_t, std::allocator<uint8_t>>, IteratorType=const char *]"
C:/Users/UserToto/AppData/Local/Temp/pip-req-build-s2124542/dependencies\json/json.hpp(26513): here
Error limit reached.
100 errors detected in the compilation of "../../src/common.cu".
Compilation terminated.
common.cu
error: command 'C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.3\\bin\\nvcc.exe' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
Encountered error while trying to install package.
tinycudann
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
My setup : RTX 2060 VisualStudio 2019
Any help would be appreciated
Same issue here, Im using latest CUDA:
nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2022 NVIDIA Corporation Built on Mon_Oct_24_19:40:05_Pacific_Daylight_Time_2022 Cuda compilation tools, release 12.0, V12.0.76 Build cuda_12.0.r12.0/compiler.31968024_0
on Python 3.9.15
@ZAO29 did you solve it ?
No sorry... But if you found any solution
No sorry... But if you found any solution
Yes I did, mismatch of Cuda on pytorch and the Cuda on your computer installed so Cuda must be same version as your pytorch is compiled with, if you have Pytorch+cuda11.6 then make sure you've Cuda 11.6 in you environment variable.
Pytorch supports up to Cuda 11.7.
Same issue here
nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2022 NVIDIA Corporation Built on Wed_Sep_21_10:33:58_PDT_2022 Cuda compilation tools, release 11.8, V11.8.89 Build cuda_11.8.r11.8/compiler.31833905_0
Name: torch Version: 2.1.0+cu118 Summary: Tensors and Dynamic neural networks in Python with strong GPU acceleration Home-page: https://pytorch.org/ Author: PyTorch Team Author-email: [email protected] License: BSD-3 Location: /home/nexus/AAI695_Project/.venv/lib/python3.10/site-packages Requires: filelock, fsspec, jinja2, networkx, sympy, triton, typing-extensions Required-by: torchaudio, torchvision Python 3.10.12
tried updating cmake and ninja-build tools