调试器在CUDA 5 [英] Debugger in CUDA 5

查看:268
本文介绍了调试器在CUDA 5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Nvidia发布了CUDA 5的延伸eclipse。他们还有VS2010的Nsight插件。在VS2010中,我们可以在内核断点处停止程序执行,但是如何在Linux上的eclipse中实现这个功能?我没有看到任何nsight特定的键来停止执行。我试图改变透视,但它调试为一个正常的C / C ++应用程序。我使用的是特斯拉C2070,英特尔至强8核机器与Linux。

解决方案

我来自Nsight Eclipse版团队。 / p>

我们的目标是将应用程序调试为正常的C / C ++应用程序。这意味着您可以设置断点,使用运行到线等,无论是否调试主机或设备代码。



基本上,这个过程是相当标准的Eclipse:


  1. 创建项目(您也可以导入现有的可执行文件)

  2. / li>
  3. 调试器将运行,默认情况下将在main函数中断开。

  4. 在设备代码中设置一个断点,然后点击resume(注意断点视图工具栏也允许设置断点在任何CUDA内核启动时)

当设备代码到达断点时,调试器将中断。您可以使用可视化调试器UI来检查应用程序状态。


Nvidia has released extended eclipse for CUDA 5. They have Nsight plugin for VS2010 also. In VS2010 we can stop program execution at breakpoint in kernel but how to achieve this functionality in eclipse on Linux? I don't see any nsight specific keys to stop execution. I tried changing perspective but it debugs as a normal C/C++ application. I'm using Tesla C2070, Intel Xeon 8 core machine with Linux.

解决方案

I'm from Nsight Eclipse Edition team.

Our goal is specifically for the application to be debugged as a normal C/C++ application. This means that you can set breakpoints, use "run to line", etc. regardless of whether you debug host or device code.

Basically, the process is quite standard for Eclipse:

  1. Create a project (you can also import existing executable)
  2. Click debug button
  3. Debugger will run and by default will break in the main function. Note that no device code posted on the device so you will only see the host thread.
  4. Set a breakpoint in the device code and hit resume (note that Breakpoints view toolbar also allows you setting breakpoint on any CUDA kernel launch)

Debugger will break when device code reaches the breakpoint. You can inspect your application state using visual debugger UI.

这篇关于调试器在CUDA 5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆