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.
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.
try to use CUDA Debug Focus. you can debug any thread in any block you want...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With