What settings I need to make in Visual Studio 2019 in order to write programs for CUDA

Write what settings I need to make in Visual Studio 2019 in order to write programs for CUDA in Windows.
The fact is that I have never seen a list of settings that need to be done in Visual Studio 2019 in order to write programs for CUDA

  • be sure to install CUDA after installing visual studio.
  • thereafter, when starting a CUDA project, select the CUDA runtime API project template

That should be all that is necessary; it should be fairly simple to start a new project. If you’d like more detailed information for the 2nd item above, it is provided in the CUDA windows install guide. However I have created many CUDA projects for windows while never once concerning myself with what is documented there.

Apart from that, the entire install guide may be useful reading.

Here is an example of creating a new project in vs 2015. Only about the first 5 steps are needed for a basic project. It shouldn’t be substantially different for vs 2019.

Here is a video that covers the basics.

I did as you advised.
I have an error in a project that Visual Studio just created:

 // Launch a kernel on the GPU with one thread for each element.
    addKernel<<<1, size>>>(dev_c, dev_a, dev_b);

Error E0029 expression required.
What should I do about it?

If this is an intellisense issue, do nothing about it. The error log has a dropdown box at the top, selecting the type of errors to show in the log. To ignore this (which should be safe) change that dropdown box from build+intellisense to build

Even if you don’t change the drop down box, you should be able to build the project normally in spite of this.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.