【发布时间】:2015-05-07 00:15:55
【问题描述】:
我使用的是 Visual Studio 2012,当我在调试模式下启动程序时,它运行顺利。 但是,当我在发布模式下运行它时,我的一个内核上出现错误“请求启动的资源太多”。
我去比较了debug和release的编译参数,好像把“Generate GPU Debug Information”选项改成“Yes(-G)”,问题就消失了。
为什么会这样?如果没有该选项,我是否缺少一些能够运行程序的东西?
编译选项:
D:\Dev\CUDA\bin\nvcc.exe -gencode=arch=compute_50,code=\"sm_50,compute_50\" --use-local-env --cl-version 2012 -ccbin "D:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\x86_amd64" -ID:\Dev\CUDA\include -ID:\Dev\CUDA\include -G -lineinfo --keep-dir x64\Release -maxrregcount=0 --machine 64 --compile -cudart static -DWIN32 -DWIN64 -DNDEBUG -D_CONSOLE -D_MBCS -Xcompiler "/EHsc /W3 /nologo /O2 /Zi /MD " -o x64\Release\main.cu.obj "D:\Dev\Projets\CUDA\ProjAdvMetrixCuda6\Discrete choice v2\main.cu"
【问题讨论】:
标签: cuda