Expand description
GPU data types: uniform vs per-lane value distinction.
The fundamental insight: GPU values are either uniform across all lanes or vary per-lane. Making this distinction in the type system prevents a large class of bugs (reading reduction results from wrong lanes, passing divergent data where uniform is expected, etc.).
Structsยง
- LaneId
- A lane identifier (0..31 for NVIDIA, 0..63 for AMD).
- PerLane
- A value that MAY DIFFER across lanes in a warp.
- Role
- A role within a warp (e.g., coordinator vs worker lanes).
- Single
Lane - A value that exists ONLY in a specific lane.
- Uniform
- A value guaranteed to be the same across all lanes in a warp.
- WarpId
- A warp identifier within a thread block.