NVlabs / instant-ngp

Instant neural graphics primitives: lightning fast NeRF and more

Home Page:https://nvlabs.github.io/instant-ngp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build problem: No CUDA toolset found

WXuanyang opened this issue · comments

I have the following error when trying to build on windows:
image

My environment:
window 10
cmake 3.22
Visual Studio 2019
CUDA 11.3

Does anyone know what's going on?

may be you need cuda 11.4

Just tried 10.2 and 11.4 and there's exactly the same error

I had same problem and solved it through mitsuba-renderer/mitsuba2#103 (comment).

Install CUDA again, and be sure to select "visual studio integration"

I'm stuck here as well.

Windows 11 21H2
Visual Studio Community 2019 installed with "Desktop Development with C++" default modules installed.
If I do: Developer Command Prompt for VS 2019 --> cmake --version
I get: cmake version 3.20.21032501-MSVC_2

Installed CUDA 11.6.0.511.23_windows using 2.5gb installer. Made sure it installed Visual Studio Integration 11.6
If I do: Windows Power Shell --> nvcc.exe --version
I get:
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

I added the following Environment Variables:
CMAKE_CUDA_COMPILER = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\bin\nvcc.exe
CUDA_PATH = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6
CUDA_PATH_V11_6 = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6

I've also copied the files in C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\extras\visual_studio_integration\MSBuildExtensions to here C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations

I've tried reinstalling VS2019 and CUDA countless times. I've restarted my PC between steps. I've made sure the files are there, the environment variables are set. I don't know what else to do.

I'm stuck here as well.

Windows 11 21H2 Visual Studio Community 2019 installed with "Desktop Development with C++" default modules installed. If I do: Developer Command Prompt for VS 2019 --> cmake --version I get: cmake version 3.20.21032501-MSVC_2

Installed CUDA 11.6.0.511.23_windows using 2.5gb installer. Made sure it installed Visual Studio Integration 11.6 If I do: Windows Power Shell --> nvcc.exe --version I get: 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

I added the following Environment Variables: CMAKE_CUDA_COMPILER = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\bin\nvcc.exe CUDA_PATH = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6 CUDA_PATH_V11_6 = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6

I've also copied the files in C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\extras\visual_studio_integration\MSBuildExtensions to here C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations

I've tried reinstalling VS2019 and CUDA countless times. I've restarted my PC between steps. I've made sure the files are there, the environment variables are set. I don't know what else to do.

I'm not sure if this is the same problem, but maybe you can try cuda 11.4 as we did, and if it doesn't work I suggest you to open a new post so more people can see it

I'm not sure if this is the same problem, but maybe you can try cuda 11.4 as we did, and if it doesn't work I suggest you to open a new post so more people can see it

I just followed the process with CUDA 11.4.4 and I have exactly the same problem.

commented

jcobreros

Same here.. did you solve it?

commented

I finally got solved.. I installed both vs 2022 and 2019. Cmake automatically used 2022 version of sdk, so I removed 2022 and the build succeeded.

SUCCESS! After hours of uninstalling and reinstalling various components I can report a recipe that works.

Windows 10, Visual Studio 2019 Community, CMake 3.22.5, CUDA 11.6

Uninstall Visual Studio
Uninstall CMake
You can leave CUDA toolkit installed if you already have it installed.

Install Visual Studio make sure to select developer build tools for MSVC stuff.
Reinstall CUDA toolkit. You can have it just overwrite the existing one of the same version without uninstalling.
Install CMake select set path during install, I picked system wide.

restart your developer shell and compile away!

@dlehgo14 I had your issue when trying to install various PyTorch geometry modules ( https://pytorch-geometric.com/whl/torch-1.8.1+cu102.html ) as dependencies for a Blender plugin ( https://github.com/pKrime/brignet ), and either the CUDA toolchain itself or the embedded Python environment's pip package manager was getting confused as to which Visual Studio instance to pass build commands through.

commented

So, I tried the solutions here and other solutions on StackOverflow, but none of them worked. What worked for me was to NOT use the developer command prompt and instead use the PowerShell inside the new windows 11 terminal.

I tried the solutions here, but it doesn't work too.
Deleting instant-ngp\build\CMakeCache.txt and cmake again succeeded.

Uninstalled VS 2022, having 2019 installed and deleted the cache as @taisei884 mentioned worked for me.

Install CUDA again, and be sure to select "visual studio integration"

Yes, I solved this issue by install again cuda's component "visual studio integration". Btw, no need to re-install all of CUDA component, just be fine to click and choose "visual studio integration". CUDA do installation just like incremental install.

commented

Uninstalled VS 2022, having 2019 installed and deleted the cache as @taisei884 mentioned worked for me.
no need to uninstall 2019

cmake . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -G "Visual Studio 16 2019"