Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 NSight 调试我的 CUDA 代码,但我有一个问题:如何为特定线程设置断点并阻塞?
当我在内核上放置断点时,调试器总是在块 0 的线程 0 处停止。
正如 Nsight 的在线帮助中所讨论的,您可以设置断点并使其以块和线程 id 为条件,如下所示:
在 CUDA C 断点上设置块或线程条件:
类型:
@blockIdx(0,2,0) && @threadIdx(5,0,0)
单击确定。断点字形显示一个加号。
尝试使用 CUDA 调试焦点。你可以调试任何你想要的块中的任何线程......