Expand description
Device limits and the dispatch geometry derived from them.
Everything in here except GpuLimits::from_client is a pure function of
GpuLimits. That is deliberate: it means the behaviour on a device with
half the shared memory, a quarter of the units per cube or a smaller plane
can be asserted in a unit test on a machine that has none of those
properties.
Structs§
- GpuLimits
- Every device limit that dispatch geometry and staging decisions depend on.
Functions§
- checked_
cube_ count - Build a static cube count, checked against the device’s per-dimension limit.
- fits_
binding - Check a single allocation against the device’s per-binding size limit.
- fits_
shared_ memory - Check a kernel’s shared-memory footprint against the device budget.
- grid_2d
- Split a flat cube count into a 2D grid within the device’s x/y limits.
- grid_
2d_ limited - Split a flat cube count into a 2D grid bounded by
max_dimper dimension. - plane_
partitions - How many whole planes a
wg_size-wide workgroup divides into. - plane_
uniform - Whether a
wg_size-wide workgroup is guaranteed to be exactly one plane. - resident_
workgroups - How many workgroups of a given shared-memory footprint stay resident.
- resolve_
workgroup_ size - Make a preferred workgroup width legal on the target device.