OpenCL C's scale kernel (if (i < n) b[i] *= k) uses no simdgroup
operation, yet on the RTX 5080 a dispatch in threadgroups of 16 paid a
second compile on emulated simdgroups and its degrade notice. The
lockstep pass orders b[i]'s read and write: two threads of a simdgroup
share their grid position's x where the threadgroup is narrower than 32
and taller than one row. The pair stands where only some threads run, so
its barrier is a subgroup barrier (a tangle barrier under maximal
reconvergence), which pins the kernel to the Direct tier's whole 32-lane
subgroups, and a 16-thread region was a partial simdgroup for the
emulated variant. In a threadgroup of one row no two threads of a
simdgroup share an x, so no pair meets and no barrier is needed.
- The lockstep analysis runs its pairs a second time where each
simdgroup lies within one row (a position's x then differs by 1 to 31
between two threads, as an index does), only where a subgroup barrier
keeps a 32-lane tier; Lockstep::rows records that none conflicts.
- Lowering takes the inserted simdgroup barriers' class after selection,
so it knows whether they are the kernel's only simdgroup semantics;
then, on a flattened tier, the kernel records RuntimeFact::RowLockstep.
- The binder runs a one-row region of such a kernel on the planned
pipeline whatever its width, that region without
REQUIRE_FULL_SUBGROUPS where it is not whole subgroups. A partial
region of two rows still takes the emulated variant.
Tests: the binder's rules (one row of 1, 16, 48 threads planned and
unflagged, 32 and 64 flagged, a 100-thread grid's edge, two-row partial
regions on the variant, no fact no exception); and on the RTX 5080
profile the scale shape keeps Direct, records RowLockstep and plans 1,
16 and 48 threads on its one pipeline, while b[gid >> 1] and a kernel
reading its lane do not.
(cherry picked from commit a6c76c206d4438e3948b05464cef7d65fd63d5ab)