Skip to main content

resident_workgroups

Function resident_workgroups 

Source
pub fn resident_workgroups(footprint_bytes: usize, limits: &GpuLimits) -> usize
Expand description

How many workgroups of a given shared-memory footprint stay resident.

Residency is the biggest lever on a latency-bound kernel, and it moves in integer steps: a footprint of 22 KiB against a 32 KiB budget fits perfectly and still runs at half the throughput of one that fits twice. Use this to find which side of a threshold a candidate staging plan lands on.

§Params

§Returns

Number of concurrently resident workgroups the shared-memory budget allows, or 0 when a single workgroup does not fit.