Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build problem: No CUDA toolset found #18

Closed
WXuanyang opened this issue Jan 17, 2022 · 17 comments
Closed

Build problem: No CUDA toolset found #18

WXuanyang opened this issue Jan 17, 2022 · 17 comments

Comments

@WXuanyang
Copy link

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?

@MaybeOjbk
Copy link

may be you need cuda 11.4

@WXuanyang
Copy link
Author

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

@ifilipis
Copy link

See the comment here https://stackoverflow.com/a/56665992

@jk4011
Copy link

jk4011 commented Jan 17, 2022

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

@bennyguo
Copy link

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

@Tom94 Tom94 changed the title Build problem Build problem: No CUDA toolset found Jan 17, 2022
@jcobreros
Copy link

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.

@WXuanyang
Copy link
Author

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

@jcobreros
Copy link

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.

@dlehgo14
Copy link

jcobreros

Same here.. did you solve it?

@dlehgo14
Copy link

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.

@pauldeepvoodoo
Copy link

pauldeepvoodoo commented Jul 17, 2022

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!

@PierceLBrooks
Copy link

@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.

@iahmedmaher
Copy link

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.

@taisei884
Copy link

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

@Syncriix
Copy link

Syncriix commented Jun 3, 2023

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

@kissingfire123
Copy link

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.

@xuzhuang1996
Copy link

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests