Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cuda Toolkit directory does not exist

I have a problem with cuda 4.1 and visual studio 2010. When I want to compile a .cu-file I get the following error:

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations\CUDA 4.1.targets(249,9): error : The CUDA Toolkit  directory '' does not exist.  Please verify the CUDA Toolkit is installed properly or define the CudaToolkitDir property to resolve this error.

I got a clean windows 7 install with only vs2010, CUDA Toolkit v4.1 and the NVIDIA GPU Computing SDK (and git) running inside a VirtualBox.

I tried to specify the toolkit directory in the project properties in "CUDA Toolkit Custom Dir", but that doesn't make any difference. Even in a completely new VBox this error occurs.

Thanks for your help!

like image 446
jaytea Avatar asked Dec 16 '22 04:12

jaytea


2 Answers

OK, I got it myself: The project I used was set up with cuda 4.0 and it did not update correctly as I installed v4.1. To update it just disable and enable "CUDA 4.1(.targets, .props)" in the Custom Build Steps.

like image 155
jaytea Avatar answered Jan 06 '23 04:01

jaytea


I got the same with Cuda 9.1 on VS 2017. What solved it for me was to set the "CUDA Toolkit Custom Dir"to be the same as CUDA_PATH. see in the following link: https://docs.nvidia.com/nsight-visual-studio-edition/3.2/Content/CUDA_Properties_Config.htm in Common section, item #1.

like image 22
Ziv Tsoref Avatar answered Jan 06 '23 06:01

Ziv Tsoref