pub fn resident_workgroups(footprint_bytes: usize, limits: &GpuLimits) -> usizeExpand 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
footprint_bytes- Shared memory one workgroup allocateslimits- Device limits fromGpuLimits::from_client
§Returns
Number of concurrently resident workgroups the shared-memory budget allows, or 0 when a single workgroup does not fit.