ashawkey / stable-dreamfusion

Text-to-3D & Image-to-3D & Mesh Exportation with NeRF + Diffusion.
Apache License 2.0
8k stars 710 forks source link

No CUDA runtime found #2

Open gibsonMatt opened 1 year ago

gibsonMatt commented 1 year ago

Hello- I'm trying to install on a windows machine. CUDA 11.8 is installed, but getting persistent error of

No CUDA runtime is found, using CUDA_HOME='C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8' running install while installing raymarching. Any ideas on where to begin?

lalalune commented 1 year ago

https://developer.nvidia.com/cuda-downloads

gibsonMatt commented 1 year ago

"CUDA 11.8 is installed"

ashawkey commented 1 year ago

@gibsonMatt Hi, maybe related to this or this?

bitRAKE commented 1 year ago

How are you verifying that the CUDA version of torch is installed? What does print(torch.cuda.is_available()) say?

The present version of torch is only built against CUDA 11.6 - I think they just started testing 11.7. Usually, that error is a mismatch in the environment.

thuanz123 commented 1 year ago

best thing is to start with same pytorch and cuda from the README image

gibsonMatt commented 1 year ago

Ah ok--must be bc I am running 11.8. Will update if downgrading solves it

Jonahss commented 1 year ago

I ran into a similar issue, but NVIDIA does not supply a CUDA 11.6 runtime for Ubuntu 22. So, I don't see how the author got that combination of versions running...

Jonahss commented 1 year ago

Ubuntu 22, torch nightly 1.12.1 and CUDA 11.7 works

smartcyf commented 1 year ago

Is windows available my env is python 3.8 + torch1.12 + CUDA 11.6 gridencoder.cu compile error

G:\MachineLearning\stable-dreamfusion\gridencoder>python setup.py build running build running build_ext building '_gridencoder' extension Emitting ninja build file G:\MachineLearning\stable-dreamfusion\gridencoder\build\temp.win-amd64-3.8\Release\build.ninja... Compiling objects... Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) [1/1] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\bin\nvcc --generate-dependencies-with-compile --dependency-output G:\MachineLearning\stable-dreamfusion\gridencoder\build\temp.win-amd64-3.8\Release\MachineLearning\stable-dreamfusion\gridencoder\src\gridencoder.obj.d --use-local-env -Xcompiler /MD -Xcompiler /wd4819 -Xcompiler /wd4251 -Xcompiler /wd4244 -Xcompiler /wd4267 -Xcompiler /wd4275 -Xcompiler /wd4018 -Xcompiler /wd4190 -Xcompiler /EHsc -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -IC:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include -IC:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\TH -IC:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\include" -IC:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\include -IC:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\include "-ID:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\include" "-ID:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\ATLMFC\include" "-ID:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" -c G:\MachineLearning\stable-dreamfusion\gridencoder\src\gridencoder.cu -o G:\MachineLearning\stable-dreamfusion\gridencoder\build\temp.win-amd64-3.8\Release\MachineLearning\stable-dreamfusion\gridencoder\src\gridencoder.obj -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr -O3 -std=c++14 -UCUDA_NO_HALF_OPERATORS -UCUDA_NO_HALF_CONVERSIONS -UCUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_gridencoder -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 FAILED: G:/MachineLearning/stable-dreamfusion/gridencoder/build/temp.win-amd64-3.8/Release/MachineLearning/stable-dreamfusion/gridencoder/src/gridencoder.obj C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\bin\nvcc --generate-dependencies-with-compile --dependency-output G:\MachineLearning\stable-dreamfusion\gridencoder\build\temp.win-amd64-3.8\Release\MachineLearning\stable-dreamfusion\gridencoder\src\gridencoder.obj.d --use-local-env -Xcompiler /MD -Xcompiler /wd4819 -Xcompiler /wd4251 -Xcompiler /wd4244 -Xcompiler /wd4267 -Xcompiler /wd4275 -Xcompiler /wd4018 -Xcompiler /wd4190 -Xcompiler /EHsc -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -IC:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include -IC:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\TH -IC:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\include" -IC:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\include -IC:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\include "-ID:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\include" "-ID:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.36.32532\ATLMFC\include" "-ID:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" -c G:\MachineLearning\stable-dreamfusion\gridencoder\src\gridencoder.cu -o G:\MachineLearning\stable-dreamfusion\gridencoder\build\temp.win-amd64-3.8\Release\MachineLearning\stable-dreamfusion\gridencoder\src\gridencoder.obj -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr -O3 -std=c++14 -UCUDA_NO_HALF_OPERATORS -UCUDA_NO_HALF_CONVERSIONS -UCUDA_NO_HALF2_OPERATORS -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_gridencoder -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 cl: 命令行 warning D9025 :正在重写“/D__CUDA_NO_HALF_OPERATORS”(用“/UCUDA_NO_HALF_OPERATORS”) cl: 命令行 warning D9025 :正在重写“/DCUDA_NO_HALF_CONVERSIONS”(用“/UCUDA_NO_HALF_CONVERSIONS”) cl: 命令行 warning D9025 :正在重写“/DCUDA_NO_HALF2_OPERATORS”(用“/UCUDA_NO_HALF2_OPERATORS”) gridencoder.cu C:/Users/aresyfchen/AppData/Local/Programs/Python/Python38/lib/site-packages/torch/include\c10/macros/Macros.h(143): warning C4067: 预处理器指令后有意外标记 - 应输入换行符 C:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\pybind11\detail/common.h(108): warning C4005: “HAVE_SNPRINTF”: 宏重定义 C:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\include\pyerrors.h(315): note: 参见“HAVE_SNPRINTF”的前一个定 义 cl: 命令行 warning D9025 :正在重写“/DCUDA_NO_HALF_OPERATORS”(用“/UCUDA_NO_HALF_OPERATORS”) cl: 命令行 warning D9025 :正在重写“/DCUDA_NO_HALF_CONVERSIONS”(用“/UCUDA_NO_HALF_CONVERSIONS”) cl: 命令行 warning D9025 :正在重写“/DCUDA_NO_HALF2_OPERATORS”(用“/U__CUDA_NO_HALF2_OPERATORS__”) gridencoder.cu C:/Users/aresyfchen/AppData/Local/Programs/Python/Python38/lib/site-packages/torch/include\c10/macros/Macros.h(143): warning C4067: 预处理器指令后有意外标记 - 应输入换行符 C:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\pybind11\detail/common.h(108): warning C4005: “HAVE_SNPRINTF”: 宏重定义 C:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\include\pyerrors.h(315): note: 参见“HAVE_SNPRINTF”的前一个定 义 C:/Users/aresyfchen/AppData/Local/Programs/Python/Python38/lib/site-packages/torch/include\c10/core/SymInt.h(84): warning #68-D: integer conversion resulted in a change of sign

C:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\pybind11\cast.h(1429): error: too few arguments for template template parameter "Tuple" detected during instantiation of class "pybind11::detail::tuple_caster<Tuple, Ts...> [with Tuple=std::pair, Ts=<T1, T2>]" (1507): here

C:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\pybind11\cast.h(1503): error: too few arguments for template template parameter "Tuple" detected during instantiation of class "pybind11::detail::tuple_caster<Tuple, Ts...> [with Tuple=std::pair, Ts=<T1, T2>]" (1507): here

2 errors detected in the compilation of "G:/MachineLearning/stable-dreamfusion/gridencoder/src/gridencoder.cu". gridencoder.cu ninja: build stopped: subcommand failed. Traceback (most recent call last): File "C:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\utils\cpp_extension.py", line 1808, in _run_ninja_build subprocess.run( File "C:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 512, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "setup.py", line 33, in setup( File "C:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\lib\site-packages\setuptools__init__.py", line 145, in setup return distutils.core.setup(**attrs) File "C:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\lib\distutils\core.py", line 148, in setup dist.run_commands() File "C:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\lib\distutils\dist.py", line 966, in run_commands self.run_command(cmd) File "C:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "C:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\lib\distutils\command\build.py", line 135, in run self.run_command(cmd_name) File "C:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "C:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "C:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\lib\site-packages\setuptools\command\build_ext.py", line 84, in run _build_ext.run(self) File "C:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\lib\distutils\command\build_ext.py", line 340, in run self.build_extensions() File "C:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\utils\cpp_extension.py", line 765, in build_extensions build_ext.build_extensions(self) File "C:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\lib\distutils\command\build_ext.py", line 449, in build_extensions self._build_extensions_serial() File "C:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\lib\distutils\command\build_ext.py", line 474, in _build_extensions_serial self.build_extension(ext) File "C:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\lib\site-packages\setuptools\command\build_ext.py", line 205, in build_extension _build_ext.build_extension(self, ext) File "C:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\lib\distutils\command\build_ext.py", line 528, in build_extension objects = self.compiler.compile(sources, File "C:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\utils\cpp_extension.py", line 738, in win_wrap_ninja_compile _write_ninja_file_and_compile_objects( File "C:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\utils\cpp_extension.py", line 1487, in _write_ninja_file_and_compile_objects _run_ninja_build( File "C:\Users\aresyfchen\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\utils\cpp_extension.py", line 1824, in _run_ninja_build raise RuntimeError(message) from e RuntimeError: Error compiling objects for extension

i cannot find the reason GPT says cuda's version error,but cuda11.6 is this proj recommend

ashawkey commented 1 year ago

Windows environment can be tricky, these errors may indicate that MSVC and CUDA versions are not matched.