docs: the 27B prefill table, the 35708cd benchmark and the DPAS attention attempt

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
This commit is contained in:
claudeandClaude Opus 5.5 committed 2026-10-24 18:51:10 +02:00
1 parent bbc7607222
commit b40dfb8e8e
1 file changed
+18 -1
+18 -1
View File
@@ -160,6 +160,7 @@ fonts (this host has none; the first post had no text) -- all unpacked without r
| 2026-10-23 | `874f8d2` | minicpm5-2b-bf16 | sycl, correctness-first kernels | `--num-speculative-tokens 0 --max-model-len 8192 --max-num-seqs 4` | 17.3 / 17.3 @2000 (8000+ skipped: over the 8192 context) | 4.2 / 3.5 | first run | `~/radiance-bench/runs/20261023-165102-minicpm5-2b-bf16-874f8d2/results.html`, posted with `report.jpg` |
| 2026-10-23 | `a869226` | minicpm5-2b-bf16 | sycl, Phase 4 step 1 (GEMV) | same | 17.5 / 17.4 @2000 | 25.3 / 16.2 | decode +504.5% | `~/radiance-bench/runs/20261023-194856-minicpm5-2b-bf16-a869226/results.html`, posted with `report.jpg` |
| 2026-10-24 | `5720a95` | qwen38-27b-m2xfp4 (Qwen3.8-27B-DFLASH2-PARO-M2XFP4) | sycl, fast m2xfp4 GEMV / DPAS verify / tiled XMX prefill, DFlash2 drafter on | `--max-model-len 8192 --max-num-seqs 4` | 113.4 / 113.3 @2000 | 19.1 / - | first run | `~/radiance-bench/runs/20261024-060226-qwen38-27b-m2xfp4-5720a95/results.html`, posted with `report.jpg` |
| 2026-10-24 | `35708cd` | qwen38-27b-m2xfp4 | sycl, + verify GEMM epilogue fused, givens/attention/head on register DPAS, typed gdn, exact chunk-parallel kkt and 1024-wide chunk scan, oneMKL prefill GEMMs | `--max-model-len 8192 --max-num-seqs 1 --embedding-placement vram` | 341.0 / 340.2 @2000 | 37.0 / - | decode +28.2%, prefill +159.8% | `~/radiance-bench/runs/20261024-175851-qwen38-27b-m2xfp4-35708cd/results.html`, posted with `report.jpg` |
| 2026-10-24 | `b0e34c6` | qwen38-27b-m2xfp4 | sycl, the speculative round's kernels (draft head and logits on DPAS, exact selection ops, typed gdn, vector norm, register-DPAS verify GEMM) | `--max-model-len 8192 --max-num-seqs 1` | 131.3 / 130.6 @2000 | 28.9 / - | decode +51.5%, prefill +15.8% | `~/radiance-bench/runs/20261024-135808-qwen38-27b-m2xfp4-b0e34c6/results.html`, posted with `report.jpg` |
| 2026-10-23 | `b07da2a` | minicpm5-2b-bf16 | sycl, Phase 4 steps 2-6 (XMX prefill, split-KV attention, norms, GEMV split) | same | 1575.6 / 1547.1 @2000 | 51.8 / 41.4 | decode +104.7%, prefill 90x | `~/radiance-bench/runs/20261023-221354-minicpm5-2b-bf16-b07da2a/results.html`, posted with `report.jpg` |
@@ -620,13 +621,29 @@ tok/s at 2584 tokens (unchanged).
| gdn_kkt_solve | 1.51 | 0.33 | a work-group a (head, chunk) -- chunks are independent -- the row terms over 512 work-items, then the solve from local memory. Exact |
| gdn_conv_prep | 0.54 | 0.45 | the conv a work-item a (token, channel), the gate cumsum a work-item a (head, chunk). Exact |
| gdn_gated_rmsnorm | 0.38 | 0.20 | the row staged in local memory before the ordered sum. Exact |
| m2xfp4 GEMMs (M >= 17) | 4.06 | see below | oneMKL's fp16 GEMM (f32 accumulate) in place of the hand-tiled XMX kernel |
| m2xfp4 GEMMs (M >= 17) | 4.06 | 1.66 | oneMKL's fp16 GEMM (f32 accumulate) in place of the hand-tiled XMX kernel; the weight decode to fp16 a (column, 32-group) a work-item |
| gemm_nt bf16 (N = 96) | 0.49 | ~0 | oneMKL's bf16 GEMM: N = 96 had fallen to the exact kernel |
| givens_dense_quant | 0.74 | 0.52 | the register-DPAS form at every row count (one pass instead of copy, batch GEMM, quantiser) |
| rmsnorm_quant_fp8 | 0.30 | 0.16 | a row's values kept in registers, only the squares in local memory (more rows a Xe core). Exact |
**Prefill, 1882 tokens: 131 -> 324 tok/s** (device time ~14.3 -> ~5.8 s). Left: the GEMMs 1.66 s
(oneMKL ~1.2 of it), attention 0.99 (the SIMT flash kernel, ~1.6 TFLOPS), the chunk scan 0.92,
givens 0.52, conv_prep 0.47, kkt 0.33, gated_quant 0.27 (half of it libref's double exp: 15 G/s on
this card, a third of float's).
oneMKL (part of oneAPI, linked by libxe2 when found; `RAD_XE2_MKL=OFF` or `XE2_NO_MKL=1` keeps the
hand-tiled kernel): 85-91 TFLOPS on random fp16 data at the 27B's shapes (probe `mklg.cpp`:
M=941 N=34816 K=5120 3.8 ms, M=1882 N=5120 K=17408 3.7 ms), deterministic run to run, against
~23-30 for the hand-tiled kernel. The prefill rotation's batched GEMMs use its `gemm_batch`.
Tried and not kept: prefill attention on register DPAS (a work-group a (kv head, 8 query rows), a
sub-group a query head, K and V^T staged in local memory a 16-key step, bf16 DPAS for Q K^T and
P V, online softmax in f32; correct, 120/120 on the 27B at rel_l2 2.3e-3). It ran no faster than
the SIMT kernel (~26-31 ms a 1882-row call): switching off its reductions, either DPAS or the global
staging loads changed nothing, skipping its compute did -- the cost is its local-memory operand
loads (~200 a step a sub-group, every query head re-reading the step's keys). A layout that shares
the K operand across query heads (or oneDNN's SDPA) is the next attempt.
## Next steps
1. The verify round, ~137 ms now against vLLM's ~68: the m2xfp4 verify GEMMs (~75 ms, ~2.5x their