I have and existing Visual Studio C++ project I want to move the logic to the GPU.
Visual Studio is installed NVIDIA Toolkit 10.2 is installed.
I wanted to start with something small.
global void GPU_test(void)
{
// test GPU code
}
then in main
GPU_test<<<1,1>>>();
Then add it to my main(). But global and the <<<1,1>>> is not recognized.
the underscores around the global are not showing up.
I am sure I am missing something silly in my setup. I even tried making a gpu.cu code but visual studio does recognize it as needing to go to the nvidia compiler.
Sorry for hijacking the thread but I came to ask for the exact same thing. Just installed CUDA toolkit 10.2, I have an updated version of Visual Studio 2019. I dont have the option of installing a new cuda project, if I open cuda files I get no syntax highlighting. What else can you use for Windows ? (Exccept visual studio code which im using now). I have installed the NSight visual studio extension ._.
I found this document…
How to integrate Cuda in a Visual C++ Project
It was a bit old and Build Customizations is under Build Dependencies.
Is this an intellisense error or an actual compilation error?
You will get an intellisense complain on
<<<
but it should compile properly. If that bothers you, you may want to check out the discussion here. If it is an actual compilation error, you should double check your CUDA installation and your settings in the Configuration Properties of your CUDA project. In VS Professional 2017 with CUDA 10.2, I really don’t need to adjust any configurations and your example code compiles just fine.