NVlabs / tiny-cuda-nn

Lightning fast C++/CUDA neural network framework
Other
3.65k stars 449 forks source link

Already setted the CUDA_HOME but still:CUDA_HOME environment variable is not set. Please set it to your CUDA install root. #426

Open xgh127 opened 5 months ago

xgh127 commented 5 months ago

The error info is as below:I've already set the CUDA_HOME and checked it on my command line,but when I run setup.py,it still tells my that"CUDA_HOME environment variable is not set. Please set it to your CUDA install root."I wonder why????????? (dmodel) C:\Users\xgh\tiny-cuda-nn\bindings\torch>python setup.py install C:\Users\xgh\tiny-cuda-nn\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 capabilities [86] from environment variable TCNN_CUDA_ARCHITECTURES nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2021 NVIDIA Corporation Built on Fri_Dec_17_18:28:54_Pacific_Standard_Time_2021 Cuda compilation tools, release 11.6, V11.6.55 Build cuda_11.6.r11.6/compiler.30794723_0 Detected CUDA version 11.6 Targeting C++ standard 17 Traceback (most recent call last): File "C:\Users\xgh\tiny-cuda-nn\bindings\torch\setup.py", line 187, in ext_modules = [make_extension(comp) for comp in compute_capabilities] File "C:\Users\xgh\tiny-cuda-nn\bindings\torch\setup.py", line 187, in ext_modules = [make_extension(comp) for comp in compute_capabilities] File "C:\Users\xgh\tiny-cuda-nn\bindings\torch\setup.py", line 172, in make_extension ext = CUDAExtension( File "C:\Users\xgh\anaconda3\envs\dmodel\lib\site-packages\torch\utils\cpp_extension.py", line 1074, in CUDAExtension library_dirs += library_paths(cuda=True) File "C:\Users\xgh\anaconda3\envs\dmodel\lib\site-packages\torch\utils\cpp_extension.py", line 1208, in library_paths paths.append(_join_cuda_home(lib_dir)) File "C:\Users\xgh\anaconda3\envs\dmodel\lib\site-packages\torch\utils\cpp_extension.py", line 2407, in _join_cuda_home raise OSError('CUDA_HOME environment variable is not set. ' OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.

(dmodel) C:\Users\xgh\tiny-cuda-nn\bindings\torch>echo %CUDA_HOME% C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6

chill781 commented 4 months ago

This is likely because your PyTorch has not been compiled with CUDA support, and it's not an issue with CUDA_HOME. I would suggest reinstalling PyTorch with CUDA support. The PyTorch codebase can be quite messy at times.