Files
metal2vulkan/crates
Anees Iqbal 05f71f54c1 rt: a quad-only kernel's ragged grid runs on its partial-threadgroups variant, checked on every device
On the profiles the quad-free tier changes, a quad-only kernel's partial-threadgroups variant was
refused before it (the emulated tier has no partial variant), so a ragged dispatchThreads grid of
such a kernel is a path that never ran there, and it runs at a size the device picks.

every_device_runs_a_quad_only_kernels_ragged_grid_on_its_partial_variant: quad_edge (inline AIR: a
quad_shuffle to the next quad lane and a quad_ballot of g % 3 != 0) over grids of 2 x 64 + 22 and
61 threads in threadgroups of 64 (or the variant's largest multiple). Each grid adds one to
partial_variant_ragged_grids and none to emulated_simdgroup_dispatches; every thread's ballot is
its quad's threads in the grid, every shuffle whose source thread is in the grid reads it (a read
past the grid is not promised, MSL 4.1 section 6.10.2), and the words past the grid keep their
fill. Where the device takes the quads at its own size the variant has no pinned size,
ALLOW_VARYING_SUBGROUP_SIZE and REQUIRE_FULL_SUBGROUPS, whole groups of maxSubgroupSize. Prints
which and the ragged grids it ran. quad_sizes is the existing quad test's device query, shared.

Verified by the jobs named in the landing line (lavapipe at 8 and 4 lanes, the Iris device leg).
2026-11-23 12:02:56 -08:00
..