CUDA directory not found
eduardobellotto opened this issue · comments
Hi.
I'm using Windows 10 version 1903.
I have Visual Studio 2019 Version 16.6.5 with MSVC v142 x64/x86 build tools (v.14.26).
I've installed .NET Framework 4.8 SDK.
I've installed CUDA Toolkit v. 10.2 (cuda_10.2.89_441.22_win10.exe file).
CUDA is on the system environment variables:
CUDA_PATH C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2
CUDA_PATH_V12_2 C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2
Path C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin
Path C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\libnvvp
I've rebuild and run CudafyByExample
in Debug x64.
The code runs OK until the line 31 with the output Running example using GeForce GT 720
but it throws the following exception in CudafyModule km = CudafyTranslator.Cudafy()
line:.
Cudafy.CudafyCompileException: CUDA directory not found.
at Cudafy.CompilerHelper.Create(ePlatform platform, eArchitecture arch, eCudafyCompileMode mode, String workingDir, Boolean debugInfo)
at Cudafy.Translator.CudafyTranslator.Cudafy()
at Analyzer.Tests.CudafyTest2.Start() in D:\Projects\TraderSolution\Analyzer\Tests\CudafyTest2.cs:line 34
at Analyzer.Program.Main(String[] args) in D:\Projects\TraderSolution\Analyzer\Program.cs:line 49
Can someone help me to solve this problem?
Thanks in advance!
I've found the problem.
It is necessary to add the path of the MSVC cl.exe file to the environment variables.
In my case, the path is:
Path C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\Hostx64\x64
I hope it could help other people.
Best regards.