试图唤醒gpu中的突破点

时间:2014-02-16 16:05:00

标签: debugging cuda nsight

我想用Nsight调试,但编译器不会在断点处停止。我启用了生成调试信息的选项。

enter image description here

这是命令行:

驱动程序API(NVCC编译类型为.cubin,.gpu或.ptx)

设置CUDAFE_FLAGS = - sdk_dir“C:\ Program Files(x86)\ Microsoft SDKs \ Windows \ v7.0A \” “C:\ Program Files \ NVIDIA GPU Computing Toolkit \ CUDA \ v5.5 \ bin \ nvcc.exe” - use-local-env --cl-version 2010 -ccbin“c:\ Program Files(x86)\ Microsoft Visual Studio 10.0 \ VC \ bin \ x86_amd64“-G -keep-dir x64 \ Debug -maxrregcount = 0 --machine 32 --compile -cudart static -o MP7.dir \ Debug \%(Filename)%(Extension) .obj“%(FullPath)”

运行时API(NVCC编译类型是混合对象或.c文件)

设置CUDAFE_FLAGS = - sdk_dir“C:\ Program Files(x86)\ Microsoft SDKs \ Windows \ v7.0A \” “C:\ Program Files \ NVIDIA GPU Computing Toolkit \ CUDA \ v5.5 \ bin \ nvcc.exe” - use-local-env --cl-version 2010 -ccbin“c:\ Program Files(x86)\ Microsoft Visual Studio 10.0 \ VC \ bin \ x86_amd64“-G -keep-dir x64 \ Debug -maxrregcount = 0 --machine 32 --compile -cudart static -g -Xcompiler”/ EHsc / nologo / Zi“-o MP7。 dir \ Debug \%(文件名)%(扩展名).obj“%(FullPath)”

当Nsight debuger启动时,断点发生变化,并出现带有以下方框信息的感叹号:

The break point will not be currently be hit No CUDA device code for source file c:\users\..\file.cu. Did you enable device information in your project? 

.ilk.pdb个文件都与.exe位于同一个文件夹中。此外,在作为Working directory的Nsight调试器中,设置了包含上述文件的文件夹。

enter image description here

此外,在内核函数中设置了断点。

我怎样才能找出问题所在?我陷入僵局。

谢谢!

PS: Win 7 64x,VS2010 64x解决方案,Nsight 3.2 64x,Cuda sdk 5.5 64x,Nsight在sdk样本中运行良好,GeForce 9600 GT(计算能力1.1

1 个答案:

答案 0 :(得分:2)

您的设备是计算能力1.1

但是你正在编译计算能力2.0:“代码生成compute_20,sm_20”

因此,没有与您的计算能力1.1设备对应的设备代码,因此您无法正确设置或命中断点。

将代码生成更改为compute_11,sm_11以匹配您的设备。