Severity Code Description Project File Line Suppression State Error MSB3721 The command
""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin\nvcc.exe" -
gencode=arch=compute_20,code=\"sm_21,compute_20\" --use-local-env --cl-version 2015 -ccbin
"D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64" -I"C:\Program
Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\include" -I"C:\Program Files\NVIDIA GPU
Computing Toolkit\CUDA\v8.0\include" --keep-dir x64\Debug -maxrregcount=0 --machine 64 --
compile -cudart static -g -DWIN32 -DWIN64 -D_DEBUG -D_CONSOLE -D_MBCS -Xcompiler "/EHsc /W3
/nologo /Od /FS /Zi /RTC1 /MDd " -o x64\Debug\kernel.cu.obj "D:\c++
project\xhfy\xhfy\kernel.cu"" exited with code 1. xhfy C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\V140\BuildCustomizations\CUDA 8.0.targets 689
我出现了上述类似的问题。查找了错误记录为
nvcc fatal : 32 bit compilation is only supported for Microsoft Visual Studio 2013 and earlier
我的系统是win10,vs是2017,cuda9.0.
基本是按照 https://blog.csdn.net/u013165921/article/details/77891913这篇文章配置的。
这里面出现这个问题。我谷歌了一下。地址:https://stackoverflow.com/questions/42600823/visual-studio-2015-msb3721-error-exited-with-code-1-on-cuda-8-0
I changed my platform toolset to Visual Studio 2013 and it worked perfectly.
也就是说改变平台工作集。还是不行
后来发现将debug改变成release才可行。个人看法:gpu可能不支持debug模式。