In the past, the use of Cuda in the Linux environment, write Cuda program, because a paper source requirements with win system +vs, first in VS Open, compile Cuda project, encountered some obstruction, hereby record.
My computer environment is win10,cuda7.5,vs2010. The first loaded vs2015, can not find NVCC, by Google, it seems vs2015 does not support Cuda.
1. First use the VS Open cuda solution or project, open the. sln file, and the project's file will appear on the left side of vs.
2. Right-click the project name, select Generate Custom option, select Cuda 7.5 in the window that appears
3. You will find the. cu and. cuh files have a red logo, right-click on the file, select Properties, on the left side of the popup window, click General, the right of "Exclude from Build" Select No, the item type Select Cuda C + +, click OK, the red logo will disappear.
3.CUDA Computing power settings: Right-click the project name, select Properties, select Configuration Properties on the left side of the pop-up window,--cuda C/c++--device, the Code generation option on the right, display the capability currently in use, to change the option to edit, Enter the one you want to change.
Then you can compile and run ...
Open Cuda project in VS