cuda中的断点不起作用!
用一个非常简单的代码,hello world,断点不起作用。 我无法写出确切的评论,因为它不是用英文写的, 但它就像“该文档的符号未加载”之类的。
没有cuda代码,main函数中只有一行printf。
工作环境为windows7 64bit、vc++2008 sp1、cuda toolkit 3.1 64bits。 请给我一些解释。 :)
with a very simple code, hello world, the breakpoint is not working.
I can't write the exact comment since it's not written in English,
but it's like 'the symbols of this document are not loaded' or something.
there's not cuda codes, just only one line printf in main function.
The working environment is windows7 64bit, vc++2008 sp1, cuda toolkit 3.1 64bits.
Please give me some explanation on this. :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
那么这只是一个主机应用程序(即与 CUDA 无关)执行 printf 操作,您无法调试?您是否选择“调试”作为配置而不是“发布”?
So this is just a host application (i.e. nothing to do with CUDA) doing printf that you can't debug? Have you selected "Debug" as the configuration instead of "Release"?
您是否尝试使用 Visual Studio 断点来停止 CUDA 设备代码 (.cu)?如果是这样的话,那么我很确定你不能这样做。 NVIDIA 已经发布了 Parallel NSIGHT,它应该允许您对 CUDA 设备代码 (.cu) 进行调试,尽管我自己对此没有太多经验。
Are you trying to use a Visual Studio breakpoint to stop in your CUDA device code (.cu)? If that is the case, then I'm pretty sure that you can't do that. NVIDIA has released Parallel NSIGHT, which should allow you to do debugging of CUDA device code (.cu), though I don't have much experience with it myself.
您是否按照文档中所述使用
-g -G
选项进行编译?此处: https://docs.nvidia.com/cuda/cuda-gdb/索引.html
Did you compile with
-g -G
options as noted in the documentation?here: https://docs.nvidia.com/cuda/cuda-gdb/index.html