Support for Visual Studio 2017
Hello, an recurrent question comes up: Does CUDA 8 support Visual Studio 2017? Thanks Martin
Hello,

an recurrent question comes up: Does CUDA 8 support Visual Studio 2017?

Thanks
Martin

#1
Posted 11/26/2016 02:00 PM   
The supported environments for CUDA 8 on windows are listed in the CUDA 8 windows install guide. [url]http://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html#system-requirements[/url]
The supported environments for CUDA 8 on windows are listed in the CUDA 8 windows install guide.

http://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html#system-requirements

#2
Posted 11/26/2016 02:40 PM   
Hi Bob, I know this list. But since the list was written, VS2017 was not released and still not really is released. The question is nevertheless: will it run on VS2017 or is there still/again a tight bond between CUDA and VS. I just want to make that nvidia knows that CUDA is not a CORE technology, it is an add on to an environment. Currerntly I cannot change the environment to a newer version when there is always a bond to CUDA.
Hi Bob, I know this list. But since the list was written, VS2017 was not released and still not really is released. The question is nevertheless: will it run on VS2017 or is there still/again a tight bond between CUDA and VS.

I just want to make that nvidia knows that CUDA is not a CORE technology, it is an add on to an environment. Currerntly I cannot change the environment to a newer version when there is always a bond to CUDA.

#3
Posted 11/26/2016 03:07 PM   
By design, the CUDA tool chain is tightly integrated with the host tool chain. This has advantages and disadvantages. Since this general setup has not changed in ten years of CUDA's public availability, one might safely, and conservatively, assume that it is unlikely to change. The list of supported host platforms and host tool chains is fixed at the time of each CUDA release, it does not change when newer host tool chains become subsequently available (in general; from what I read NVIDIA [i]may[/i] be working on an update to CUDA 8 that makes it compatible with a newer version of Xcode on Mac OS X; if that comes to pass, it would be the first exception I am aware of).
By design, the CUDA tool chain is tightly integrated with the host tool chain. This has advantages and disadvantages. Since this general setup has not changed in ten years of CUDA's public availability, one might safely, and conservatively, assume that it is unlikely to change.

The list of supported host platforms and host tool chains is fixed at the time of each CUDA release, it does not change when newer host tool chains become subsequently available (in general; from what I read NVIDIA may be working on an update to CUDA 8 that makes it compatible with a newer version of Xcode on Mac OS X; if that comes to pass, it would be the first exception I am aware of).

#4
Posted 11/26/2016 08:51 PM   
Hi! I've written a blog post about building your CUDA projects on Visual Studio 2017: https://www.olegtarasov.me/how-to-build-cuda-toolkit-projects-in-visual-studio-2017 . Unfortunately, NVidia extensions don't work, so we'll have to wait for the official release from NVidia.
Hi!

I've written a blog post about building your CUDA projects on Visual Studio 2017: https://www.olegtarasov.me/how-to-build-cuda-toolkit-projects-in-visual-studio-2017 . Unfortunately, NVidia extensions don't work, so we'll have to wait for the official release from NVidia.

#5
Posted 03/25/2017 07:32 AM   
I have installed cuda_9.1.85_win10.exe and VisualStudio 2017 Community version 15.5.2. When I compile the sample "addKernal" I get 3 errors: 1. E0029 expected an expression addKernel<<<1, size>>>(dev_c, dev_a, dev_b); there is red underline under the third < 2. C1189 Only the versions ... goes to line 135 of host_config.h #if _MSC_VER < 1600 || _MSC_VER > 1911 #error -- unsupported Microsoft Visual Studio version! Only the versions 2012, 2013, 2015 and 2017 are supported! 3. MSB3721 goes to line 707 of CUDA 9.1targets <CudaCompile Any help would be greatly appreciated!
I have installed cuda_9.1.85_win10.exe and VisualStudio 2017 Community version 15.5.2. When I compile the sample "addKernal" I get 3 errors:

1. E0029 expected an expression
addKernel<<<1, size>>>(dev_c, dev_a, dev_b);
there is red underline under the third <

2. C1189 Only the versions ...
goes to line 135 of host_config.h
#if _MSC_VER < 1600 || _MSC_VER > 1911

#error -- unsupported Microsoft Visual Studio version! Only the versions 2012, 2013, 2015 and 2017 are supported!

3. MSB3721
goes to line 707 of CUDA 9.1targets
<CudaCompile

Any help would be greatly appreciated!

#6
Posted 12/28/2017 05:41 PM   
Hi Johnybinp, the problem is currently not solved and also no one from nvidia is able to give an appropriate solution. Since VS2017 is now updated more frequently and some stupid guy at nvidia hardcoded the version number, every new update of VS2017 will give the next problem. Event if a new update/release of CUDA is available, the next release of VS2017 will have the same problem again. One solution would be to install the VS2015 build tools which you either download seperately or download via the VS2017 installer. Then you have to retarget the compiler-bin directory (a commandline option I currently cannot remember exactly) and then it shoudl work. This is how we do it currently. The stupid thing about and - and sorry nvidia but thats a fact since years - nvidia is to stupid to allow the nvcc to attach to a multitude of compilers and hooks in directly to Visual Studio this problem will last for each VS version. I personally would go with LLVM/clang but since we are creating PTX code and no cubin code there is also no clear answer if PTX can be created with clang and there's also no answer if the PTX code from clang (if available) is the same to the NVCC code.
Hi Johnybinp,

the problem is currently not solved and also no one from nvidia is able to give an appropriate solution. Since VS2017 is now updated more frequently and some stupid guy at nvidia hardcoded the version number, every new update of VS2017 will give the next problem. Event if a new update/release of CUDA is available, the next release of VS2017 will have the same problem again.

One solution would be to install the VS2015 build tools which you either download seperately or download via the VS2017 installer. Then you have to retarget the compiler-bin directory (a commandline option I currently cannot remember exactly) and then it shoudl work. This is how we do it currently.

The stupid thing about and - and sorry nvidia but thats a fact since years - nvidia is to stupid to allow the nvcc to attach to a multitude of compilers and hooks in directly to Visual Studio this problem will last for each VS version.

I personally would go with LLVM/clang but since we are creating PTX code and no cubin code there is also no clear answer if PTX can be created with clang and there's also no answer if the PTX code from clang (if available) is the same to the NVCC code.

#7
Posted 12/28/2017 11:34 PM   
[I am not telling you to do this, I am just telling you that you [i]can[/i] do this:] Remove the MSVC version number checks from NVIDIA files. See how far you get with that approach, then ponder how "stupid" "that guy" at NVIDIA was.
[I am not telling you to do this, I am just telling you that you can do this:]
Remove the MSVC version number checks from NVIDIA files. See how far you get with that approach, then ponder how "stupid" "that guy" at NVIDIA was.

#8
Posted 12/29/2017 03:23 AM   
[quote=""][I am not telling you to do this, I am just telling you that you [i]can[/i] do this:] Remove the MSVC version number checks from NVIDIA files. See how far you get with that approach, then ponder how "stupid" "that guy" at NVIDIA was. [/quote] Yes of course you can remove some checks from the nvidia files, but as it is an official version, and I want to use the toolkit as is, I see no reason why I should look like into these files. nVidia knows this problems for a long time. And in my company a whole department is struggling with this problems. And because of these problems they cannot upgrade to a newer VS version (ONLY because of CUDA). All the rest works perfectly.
said:[I am not telling you to do this, I am just telling you that you can do this:]
Remove the MSVC version number checks from NVIDIA files. See how far you get with that approach, then ponder how "stupid" "that guy" at NVIDIA was.


Yes of course you can remove some checks from the nvidia files, but as it is an official version, and I want to use the toolkit as is, I see no reason why I should look like into these files. nVidia knows this problems for a long time. And in my company a whole department is struggling with this problems. And because of these problems they cannot upgrade to a newer VS version (ONLY because of CUDA). All the rest works perfectly.

#9
Posted 12/29/2017 10:50 AM   
Scroll To Top

Add Reply