This repository has been archived on 2026-11-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
radiance-sycl/libxe2
claudeandClaude Opus 5.5 86955a62c5 libxe2: prefill flash attention four threads a (16 rows, query head), at the default register file
The 8-row form holds a thread's 8 x 256 f32 accumulator, which keeps it on the large register file
at 4 threads an EU; its stall samples were scoreboard waits, too few threads to cover the latency
of each step's loads and DPAS chains (paired threads sharing 16 rows showed it: 15 TFLOPS at one
work-group a core, 23.6 at two).

xe2_attn_flash_quad.cpp: a quad of threads takes 16 query rows of one head and 64 keys a step,
thread qd scoring page qd for all 16 rows (two DPAS chains on each key tile), the quad swapping row
maxima, then P and row sums, through local memory, and each thread running P V for its quarter of
the head dims. A 16 x 64 f32 accumulator: 128 registers with no spill, two work-groups (48
threads) a core. The softmax runs in the step's two 32-key halves in turn, so every value is the
8-row form's: probe output bit-identical at 2k..64k. It lives in libxe2 proper (the large-register
library would force it to 256); attn_paged_fast tries it first for rows >= 16, XE2_ATTN_NO_QUAD
skips it. (The query staging split four ways, by head-dim steps too, gave wrong output; two
threads stage a half each, not understood yet.)

Probe, 2048 rows over 2k / 8k / 16k / 32k / 64k of context: 16.7 / 25.0 / 24.0 / 23.4 / 22.3 ->
18.8 / 28.0 / 28.2 / 28.5 / 28.1 TFLOPS. Fresh prompts (mtp4fc, MTP 6), against 2da2eb0: ~2.1k
1419 -> 1426 tok/s, ~6.9k 1382 -> 1400, ~24k 1177 -> 1221, ~47k 952 -> 1025.
rad-kbench attn --all-rows 227/227, full replay 1410/1410, greedy 8/8.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 01:55:04 +01:00
..