GPU并行计算问题:出现MSB3721 error exited with code

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模式。

 

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值