Archived
At depth the kernel fell from 18 to 13.6 TFLOPS (a 2048-row chunk of Qwen3.8-27B's 24/4 heads,
head_dim 256, over 8k -> 64k of context): every 8-row work-group streamed its kv head's whole history,
and the stall samples were scoreboard waits on each step's loads, issued just before their DPAS.
- gqa <= 8: four 8-row blocks a work-group (the threads of one Xe-core walk the same pages, so a
page comes from L2 once for 32 rows; 128 KiB of staged queries), and two of its threads prefetch
the next step's two pages to L1 (one gather lane a 64-byte line). Each alone was worth little or
lost (prefetch from 8-row work-groups: 7.9 TFLOPS at 64k); together 13.6 -> 19.6.
- the value loop's 2D loads 8 at a time before their DPAS (2, 4, 16 measured; the score loop's
batched the same way spilled and lost).
- the accumulator rescale skipped when no row's max moved (x * 1.0f is x).
Every sum is in the order it was, so the output is unchanged: probe output bit-identical at
2k..64k, rad-kbench attn --all-rows 227/227, full replay 1410/1410, greedy 8/8.
Probe, 2048 rows over a context of 2k / 8k / 16k / 32k / 64k: 13.9 / 18.3 / 16.8 / 15.2 / 13.6 ->
16.7 / 25.0 / 24.0 / 23.4 / 22.3 TFLOPS. Fresh prompts (mtp4fc, MTP 6): ~2.1k 1423 tok/s, ~24k 1177,
~47k 952 (bench-standard's 32k / 64k depths measured 1077 / 806 at 7f95c56).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>