CUDA 5.x and VS 2012

I need instructions on how to integrate CUDA 5.x projects in VS 2012,
especially on how to setup the build rules.

And any idea when CUDA 5.x will be fully integrated in VS 2012,
with regards to build rules and e.g. project wizards?

I’ve not tested it by myself, but look like here is all you need to do

Thx this helped me a lot.

I’m still trying to get VS 2012 and CUDA 5.x to work together. I followed the link above, and made the required changes. Every project I’ve tried from the SDK for VS 2010 can be loaded in VS 2012, converted to VS 2012, and will compile.

Any new VS 2012 project, specifically an ‘Empty Project’, which I use to write a Hello World program with a global function, will not compile. The code is as follows.

#include

global void kernel()
{
}

int main()
{
kernel();
std::cout Build started 11/20/2012 9:23:41 AM.
1>InitializeBuildStatus:
1> Touching “Debug\Project2.unsuccessfulbuild”.
1>ClCompile:
1> Source.cu
1>c:\users\drbucko\documents\visual studio 2012\projects\project2\project2\source.cu(3): error C2144: syntax error : ‘void’ should be preceded by ‘;’
1>c:\users\drbucko\documents\visual studio 2012\projects\project2\project2\source.cu(3): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\drbucko\documents\visual studio 2012\projects\project2\project2\source.cu(9): error C2059: syntax error : ’

The [url]http://blog.norture.com/2012/10/gpu-parallel-programming-in-vs2012-with-nvidia-cuda/[/url] noted above has been updated, and the updated files in the downloadable file “BuildCustomizations.rar” provided the solution I needed. Follow the directions, and use the downloaded files. It worked.

This also works for VS 2012 Express.
In contrast to former VS Express versions this version allows to mix C# and C(++) in the same solution.

Works like a charm. CUDA missed me a lot, it took me a while to find this tutorial ! Thanks.

Everyone,
Is there any news on when VS2012 and CUDA 5.x will be working together. I performed the instructions on the above mentioned blog and the code will compile, but it does not make an exe file. Also some of the CUDA specific syntax is perfect and the very next line with the same keyword will have a red-underline. Finally, any idea on how to get Nsight working with VS2012.

Thx,
Damon

Nsight I know does not currently support VS2012.

From another thread, Mod Jeff Davis posted in November of 2012:

“Nsight Visual Studio 2012 support will come with the next version that is scheduled for Q2’13.
One big reason for not supporting VS2012 is that the CUDA 5.0 toolkit doesn’t support the new toolchain. Sorry for the inconvenience.
I should mention that the next release candidate of Nsight 3.0 will support C++ AMP debugging in VS2012 (but no other Graphics or CUDA features will be supported)”

and he again posted in April 2013:

“I’d like to reiterate again the best estimate we can give right now is Q2’2013 for Visual Studio 2012 support. We are working hard on it. Sorry for the inconvenience. I have locked the thread.”

It would seem that a release should be coming this month if they have not had a delay. It is the last month of Q2.