A CUDA context was created on a GPU that is currently not debuggable. Breakpoints will be disabled解决

在使用Nsight进行CUDA调试时遇到无法命中断点的问题,本文档详细介绍了问题的原因及解决办法,包括Nsight版本与显卡驱动的兼容性问题,并提供了一种可行的解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

A CUDA context was created on a GPU that is currently not debuggable. Breakpoints will be disabled 解决方案

   win10 系统,vs2013,CUDA8.0,Nsight 5.2,Tesla C2075显卡,在CUDA调试程序时,程序直接忽略断点。Nsight的属性设置和NVIDIA Moniter设置都正确,但还是不行。无奈之下,去NVIDIA官网查阅资料https://developer.nvidia.com/gameworksdownload,终于找到问题在哪里。原来是Nsight的版本不兼容。

       安装cuda8.0,程序会自动给你装上Nsight5.2,这个是Nsight的最新版本。但Nsight5.2必须配备较高版本的驱动和较新的显卡:

Important information about the NVIDIA® Nsight™ Visual Studio Edition 5.2 release

Display Driver

You must install the NVIDIA display driver that supports the NVIDIA Nsight tools. If you have an NVIDIA graphics card installed on your target machine, you likely already have an NVIDIA display driver; however, NVIDIA Nsight requires a specific version of the driver in order to function properly. From the NVIDIA web site, download and install the following display driver (or newer):

GeForce driver release 376.09 or newer

Quadro driver release 375.86 or newer 

这段话是Nsight5.2 官方文档,支持的驱动GeForce 要达到376.09,Quadro 375.86.,具体驱动号和驱动下载可以去官网输入系统和显卡型号查询http://www.nvidia.cn/Download/index.aspx?lang=cn。当然驱动可以不必自行下载安装,当装上cuda8.0后,驱动会自动安装更新。

下图是Nsight5.2支持的显卡型号,对于Tesla显卡,只支持K系列的,C系列的不支持。我的显卡是C2075,原来Nsight5.2并不支持,所以CUDA调试无法命中断点。



解决方法只能是卸载,安装老版本的Nsight。由于Nsight是随CUDA自动安装的,为了以后不必要的麻烦,我干脆把cuda8.0卸载掉了,安装了cuda7.0,cuda7.0自带的Nsight4.5,支持C2075.,经过试验,CUDA调试正常。

    当然也可以尝试不卸载CUDA8.0,在官网下载Nisght Visual Studio Edition5.1以下版本,单独安装。不过能否兼容不知道。


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值