3
votes

My graphic card is EVGA GTX 550 Ti and Compute Capability is 2.1, I want set Code Generation to compute_20,sm_21in Configuration Properties in Visual studio for dynamic global memory allocation in device. I follow this link but after change compute_10,sm_10 to compute_20,sm_21, compiler still use previous parameters. message of output window is:

1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations\CUDA 5.0.targets(498,9): error MSB3721: The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\bin\nvcc.exe" -gencode=arch=compute_10,code=\"sm_10,compute_10\" --use-local-env --cl-version 2010 -ccbin "E:\Programs\Microsoft Visual Studio 10.0\VC\bin" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\include" -G --keep-dir "Debug" -maxrregcount=0 --machine 32 --compile -arch=sm_20 -g -D_MBCS -Xcompiler "/EHsc /W3 /nologo /Od /Zi /RTC1 /MDd " -o "Debug\kernel.cu.obj" "C:\Users\Mahdi\Documents\Visual Studio 2010\Projects\Paralllel SW Algorithm\Paralllel SW Algorithm\kernel.cu"" exited with code 2.

Specifications:
Microsoft visual studio 2010
Nsight Visual studio v3.0
CUDA Toolkit v5.0 64bit

1

1 Answers

2
votes

If you added -arch=sm_20 in the "additional options" area, that won't work. You must change it in the relevant project properties area. Instead of following the "question", you should have followed the first (accepted) answer in that link

  • delete the addition you made in the "additional options" area.
  • with the project properties dialog open, on the left hand side, under "configuration properties", select "Device" under CUDA C/C++
  • now on the right hand pane, there is a drop down selection box for "Code Generation", select "compute_20, sm_21". Since you are building the debug version of the project, make sure to make this change for the debug version in the properties (listed at the top of the dialog box). You probably also want to make this change in the release version as well.

Instead of following the picture here you should follow the picture here