Any way to have Nsight debugger only target certain kernels?

I don’t see any option to force Nsight to not instrument/debug/check certain kernels.

I have a large CUDA codebase and Nsight takes a long time plowing through the earlier kernels in the pipeline before reaching the kernel of interest.

Did I somehow miss how to enable this feature?

Thanks!

Hi,

What do you mean of “certain kernel”? If you want to debug a specific name kernel, you could use Function Breakpoint in Breakpoints window. Give the interest kernel name in Function Name field and save. Do not set other breakpoints. Launch Cuda Debugging. Then the debugger will stop at the right kernels.

If you want the kernel stops at other conditions, like hit count is 5 or when variable A is 5, you could use conditional breakpoint. Set a breakpoint and right click on it. Choose Conditions and provide your conditions. Are these what you want? Thanks.

Qian

I’m very familiar with Nsight basics but I left out one important detail…

Nsight is incorrectly reporting an error in a kernel earlier in my kernel pipeline and I’m unable to debug any kernel after that point.

How do I know it’s an incorrect false positive error? I can never say there aren’t bugs in a kernel, but the Debug and Release kernels run correctly outside of Nsight. Stream synchronization is used immediately after the kernel launch to check for errors.

Furthermore, the error is also reported as a global memory access error on lines that access shared memory. For this reason I’m skeptical that Nsight isn’t inducing the error.

This keeps me from debugging the kernel I’m interested in and the end result is, “You can’t get there from here.”

I’d really like to focus on a kernel like I can in the profiler:

I’m on Win10x64/361.60/7.5/VS2013.

Hi,

Did you enable memory check in Nsight? Disable it if you don’t want to. You can also select check types in Nsight options. In Visual Studio -> Nsight menu -> Options -> CUDA, set Stop on launch failure to False. If these settings cannot skip your previous exception, could you use F5 (Continue) to jump current kernel until your interested one? Thanks.

Qian

Yes, I had already tried those approaches: Memory Check on/off, Stop on Launch Failure, etc.

The debugger will usually break on an exception but I once got a “Code Patching Memory Factor” warning and went ahead and increased the factor. It didn’t help.

Again, it’s only failing on a large grid of about 80,000+ blocks when Nsight is in use. Smaller grids run fine in Nsight.

I’m sorry to hear that. Any chance we could get your application and try on our side? Thanks.

Qian