Archived
Fewer query heads a work-group (more work-groups a core) lost badly -- 28.3 -> 16.5 TFLOPS at 64k with two of six, 11.3 with one: the six heads' threads sharing each page through L1 matter more than occupancy. So the other way: for gqa <= 6 a work-group is two 16-row groups (48 threads, 126 KiB of staged queries and swap area), walking to its later group's end so every thread joins every barrier (the earlier group's extra keys are past its rows' positions: hidden, P = 0, the same output). Queries read from global instead of staged cost ~10% and were dropped; three row groups (72 threads) do not launch. #pragma unroll had left the score and value loops rolled (5 DPAS in the binary); clang loop unroll(full) gives the 64, worth ~1%. Probe, 2048 rows over 2k / 8k / 32k / 64k: 18.8 / 28.0 / 28.5 / 28.1 -> 18.4 / 30.0 / 30.5 / 30.5 TFLOPS, output bit-identical. Fresh prompts (mtp4fc, MTP 6): ~2.1k 1426 -> 1425 tok/s, ~24k 1221 -> 1234, ~47k 1025 -> 1048. rad-kbench attn --all-rows 227/227, full replay 1410/1410, greedy 8/8. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>