Reputation: 1707
I am using NSight to debug my CUDA code and I have question: how can I place a breakpoint for a specific thread and block?
When I place a breakpoint on the kernel the debugger always stops at thread 0 of block 0.
Upvotes: 2
Views: 1584
Reputation: 14575
try to use CUDA Debug Focus. you can debug any thread in any block you want...
Upvotes: 4
Reputation: 72372
As discussed in the online help in Nsight, you can set a breakpoint and make it conditional on block and thread id like this:
To set a block or thread condition on a CUDA C breakpoint:
Type:
@blockIdx(0,2,0) && @threadIdx(5,0,0)
Click OK. The breakpoint glyph shows a plus sign.
Upvotes: 9