AMD GPU Breakpoints
Breakpoints affect all GPU threads, and cause the program to stop when a thread reaches the breakpoint. Threads of the same wavefront reach the breakpoint together and the kernel pauses once per wavefront.
The number of breakpoints hit in a GPU kernel can be refined using:
Conditional Breakpoints, see Conditional breakpoints.
Hit Limits, see Set breakpoints.
Furthermore, where kernels have divergent distributions of work across threads, all GPU threads will stop at a given breakpoint. However, the GPU Threads that are not involved in the work at this breakpoint will appear as in-active and cannot be selected.
For example, a divergent if-else statement with a breakpoint set on each branch will result in all GPU threads stopping at the first breakpoint, but with those not satisfying the if-statement criteria being marked as in-active. When the first breakpoint has been hit by all GPU threads, all threads will progress to the next branch of the if-else statement but with the GPU threads who do not satisfy the else-statement criteria being marked as inactive.
To apply breakpoints to individual workgroups, wavefronts, or threads,
conditional breakpoints can be used. For example using the built-in
variables threadIdx.x (and threadIdx.y or threadIdx.z as
appropriate) for thread indexes and setting the condition appropriately.
AMD GPU Tracepoints
Similar to behavior observed with breakpoints, tracepoints affect all GPU threads. Threads of the same wavefront reach the tracepoint together and the tracepoint is reported once per wavefront, reporting the variable values of the first GPU thread in the wavefront.