15.4.11.1 HIP Built-in Variables

These context variables exist throughout the lifetime of a HIP kernel. ROCgdb can evaluate them in any expression, as long as the current language is hip.

threadIdx

The three-dimensional position of the current HIP thread (a.k.a. lane) within the HIP block.

blockIdx

The three-dimensional position of the current HIP block within the grid.

blockDim

Dimensions of the current HIP block.

gridDim

Dimensions of the current HIP grid in number of HIP blocks.

warpSize

The size of the wavefront for the dispatch that the current kernel belongs to.