Cuda 9.2 does NOT work with Visual Studio 2017 15.7.1

Yep, worked for me too! At least getting it installed, I have not tried to compile anything yet. Thanks stuwmp!!!

This fiasco has done us a massive favour to be honest.

It forced us to consider whether locking ourselves to one vendor is the sensible way to go. We now have our application working (very well) with Vulkan, and I am SO pleased we did.

It means we can use non-NVIDIA cards in machines that were sitting around doing nothing until now. And our students can run our application on their machines if they have powerful AMD cards for instance. They are obviously pleased too!

Thanks NVIDIA / Microsoft - worked out better for us in the end :-)

I got some of the sample programs to build but when trying a simple program from the book Cuda for Engineers, dist_v2_cuda example wouldn’t compile and I got the same message about the version of VS not being compatible and the line with device was shown with the red squiggles etc. I’m using VS 2017 15.7.x.

Has anyone got it working with 15.6.x?
I’m just starting out with CUDA and these issues arn’t encouraging.

Is there any news of a solution or patch yet?

PaulK_UK,
I was able to get that sample running (cloned from github here: https://github.com/myurtoglu/cudaforengineers)

Under Project->Build Customizations changed from CUDA7.5 to CUDA9.2

(you might need that macro change I mentioned too ;) )

E:\dev\cudaforengineers\dist_v2_cuda\x64\Debug\dist_v2_cuda.exe
i = 32: dist from 0.500000 to 0.507937 is 0.007937.
i = 33: dist from 0.500000 to 0.523810 is 0.023810.
i = 34: dist from 0.500000 to 0.539683 is 0.039683.
i = 35: dist from 0.500000 to 0.555556 is 0.055556.
i = 36: dist from 0.500000 to 0.571429 is 0.071429.
i = 37: dist from 0.500000 to 0.587302 is 0.087302.
etc – does this look correct?

BuildCustomization.PNG

BuildCustomization.PNG

I changed the host_config file as you described, and while that got rid of the incompatibility message, the build errors persisted.

Your output looks correct. It shows the data from element 32 to 64 first then 0 to 31. The book says something about sorting out that issue later, I just havent got that far yet.

I downloaded VS2017 version 15.6.7 and will try installing everything again next week. Yet more time to waste…

While I agree that it is very frustrating when the two major corporations cannot work together, but I will give some slack as Nvidia seems to kick out new releases at breakneck speed. It seems hard enough to keep up with them much less adding VS 2017 into the mix. For my own sanity, I keep both VS 2015 and VS 2017 (15.5.1) on my machine. I also have Cuda 8.0, 9.0, 9.2 and 9.2 installed. I find VS 2015 is the better tool for Cuda stuff and VS 2017 for running Python since it supports 3.6.

I am building the Cuda 9.2 samples with VS 2015 while building OpenCV 3.4.1 with support for Cuda 9.2.After that I will build dlib 19.13 with Cuda 9.2. I had Tensorflow-GPU running and I will see if it is worth upgrading to 9.2.

Will all this work? Don’t know yet. But I will know soon. I need a reliable Windows 10 environment and a Ubuntu 16.04 environment and my new dual GPU (p-500’s) will be here tomorrow.

Doug

what is the cudnn version you used and what visual studio version?
i have gtx 1060 nvidia card , i failed to make my GPU work
please let me know if you have any idea how to set my GPU with windows 10 and better in annacoda env.

thank you in advance

Didn’t see it in this thread, so pointing folks to the downloadable installer for MSVS that works with the latest 9.2 CUDA installer: (release 15.6.7 or earlier)

I have tried to install CUDA 9.0 on VS 2017 15.7.4 but still has an error:

The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin\nvcc.exe" -gencode=arch=compute_30,code=\"sm_30,compute_30\" --use-local-env --cl-version 2015 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64" -x cu  -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\include"  -G   --keep-dir x64\Debug -maxrregcount=0  --machine 64 --compile -cudart static  -g   -DWIN32 -DWIN64 -D_DEBUG -D_CONSOLE -D_MBCS -Xcompiler "/EHsc /W3 /nologo /Od /FS /Zi /RTC1 /MDd " -o x64\Debug\kernel.cu.obj "C:\Users\amani\source\repos\TestCuda9.0_2017\TestCuda9.0_2017\kernel.cu"" exited with code 53.

Is it possible to run CUDA 9.1 or even 9.0 on VS 2017 15.7.4 ? or I have to install an earlier release ?

Did the templates also install correctly? I tried this and they’re missing.

You would need to at the very least install the previous (15.6) toolset and compile with it. The visual studio installer should have an option for that, Or install a previous version, yes.

NVidia needs to hire you. After retargeting the solutions, the examples actually compiled. Thanks.

If anyone’s still having this problem, do this:

  1. open c:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\include\crt\host_config.h
  2. find this line: #if _MSC_VER < 1600 || _MSC_VER > 1913
  3. replace it with this: #if _MSC_VER < 1600
  4. observe:
    ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

:)

Should probably work with future version conflicts as well.

nvidia with its billions cant do it but simple users can. love it.

Hey guys,
first of all this issue is really driving me nuts. I have been trying to install the CUDA v9.2 version on my laptop (XPS5970) for the last couple of days and could not get it to work at all. After a while I had found this blog and was relieved that the steps mentioned above would resolve this issue, but unfortunately I still get the error below after I had done replaced the code segment above. I also tried to reinstall it multiple times, but it didn’t seem to work. I would appreciate any help I can get on this.

The error after I have done all the steps above:

1>------ Build started: Project: matrixMul, Configuration: Debug x64 ------
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Platforms\x64\PlatformToolsets\v141\Toolset.targets(36,5): error MSB8036: The Windows SDK version 10.0.15063.0 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting “Retarget solution”.
1>Done building project “matrixMul_vs2017.vcxproj” – FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

PS: Just so that you guys know, I am not a developer and am just looking to maximizing my computing power for deep learning as this is a field of interest to me. Therefore I have only basic understanding of the art of computer programming.

1 Like

Ober, that is the error you want to have because it’s so easy to fix. Just right click the solution and click retarget solution. Pick whatever version of the windows SDK you have installed. You should be able to compile.

Wonderful news: CUDA 10 is out and the documentation says: “Starting with CUDA 10.0, nvcc supports all versions of Visual Studio 2017 (past and upcoming updates)”.

Yeah, right, compute 7.0 / 7.1 will not work (Cuda 10), I get compile errors on Windows 10 system.

If I remove these, the program will compile with Cuda 10.

They work fine in Cuda 9.2.

Nvidia — What gives ?

Hello

I have installed cuda 9.0 and mirosft visual studio 2017
I try to open cudA samples I am facing following issue

error : Designtime build failed for project ‘C:\ProgramData\NVIDIA Corporation\CUDA Samples\v9.2\0_Simple\matrixMul\matrixMul_vs2017.vcxproj’ configuration ‘Debug|x64’. IntelliSense might be unavailable.
Set environment variable TRACEDESIGNTIME = true and restart Visual Studio to investigate.

However I have added environment variable still my error is persist

it would be great if some one can help me to resolve this issue

Thank you

Gopi

I am sure no one wants to here this but here goes. I do not trust VS 2017, seen too many odd behaviors when work on large C# applications. Never got VS2017 to work with Cuda.anything. So I use VS 2015 with Cuda 8.0, 9.0, 9.1 and 9.2.

Doug