我的显卡是 EVGA GTX 550 Ti,计算能力是 2.1,我想在 Visual Studio 的配置属性中设置Code Generation
为设备中的动态全局内存分配。我关注此链接,但更改为后,编译器仍使用以前的参数。输出窗口的消息是:compute_20,sm_21
compute_10,sm_10
compute_20,sm_21
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"" 以代码 2 退出。
Specifications:
Microsoft Visual Studio 2010
Nsight Visual Studio v3.0
CUDA Toolkit v5.0 64bit