AMD GPU Breakpoints
Breakpoints are hit for every GPU thread and not grouped per block. This will cause the program to stop when any thread reaches the breakpoint.
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.