Commit Graph
469 Commits
Author SHA1 Message Date
claudeandClaude Opus 5.5 5ed4ff847e libxe2: the w4a16 decode GEMM a tile's K splits a work-group, reduced in local memory -- decode proxy 46.3 -> 48.5 tok/s
The first form ran a thread a (tile, split) and a separate reduction launch over partials in global
memory, and kept narrow-N shapes on one split (too few threads to fill the card). Now a tile's splits
are one work-group whose partial sums meet in local memory, added in split order, and S is the
divisor of the group count closest to 8 groups a thread. Probe w4d.cpp at M = 4: gate_up 190-208 ->
162 us, N 16384 125-147 -> 79, N 12288 108-117 -> 61, down 148 -> 83, N 5120 K 6144 35 (+ reduce)
-> 32, N 1024 10 (+) -> 7.4 -- the weights at the card's ~560 GB/s.

XE2_W4_CHECK on the 27B (M = 5): 10 of 81920, 6 of 25600 and 14 of 174080 bf16 outputs differ from
libref's loop (ties; rel_l2 <= 1.8e-5); greedy text unchanged; dec_quick.py 46.3 -> 48.5 tok/s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 01:51:00 +01:00
claudeandClaude Opus 5.5 d63d1bc8a5 libxe2: the skinny bf16 GEMM at M <= 8 in ESIMD -- ssm_ab 38.6 -> 4.7 us, the MTP block's GEMVs up to 2x
A thread a (16-column tile, K split): W^T comes straight from the weight rows by one transposed 2D
load a 16-column step (the bf16 DPAS's VNNI B operand as it arrives), the activation by a 2D load
(rows past M as zeros), one DPAS of RC = 1, 2, 4 or 8 rows; a work-group is one tile's splits,
summed in split order in local memory. S is the smallest divisor of K/16 giving ~8192 threads, at
most 40. Probe bfg.cpp: the DeltaNet's N = 96 projection at M = 4 38.6 -> 4.7 us (launch_dpas8
staged all 8 rows x K in each of 6 work-groups); the MTP block at M = 1, N 5120 K 6144 ~206 -> 110,
N 5120 K 10240 ~370 -> 180, N 12288 ~375 -> 214, N 34816 ~682 -> 595 (synthetic bf16, which
compresses a little).

rad-kbench: fixture gemm_nt + logits_gemm 686/686; qwen3.8-27b-w4a16-rtn gemm_nt 622/622 (the new
rows' worst rel_l2 1.5e-4, tolerance 8e-3). A first version reduced only rows below S, so rows 4-7
of an 8-row call over 4 splits were never stored (kbench caught it: rel_l2 0.71). Decode proxy
(dec_quick.py): a round ~2-3 ms shorter, 45.5 -> 46.3 tok/s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 01:41:37 +01:00
claudeandClaude Opus 5.5 dd0ee312a4 docs: the int4 W4A16 Qwen3.8-27B on the B65 -- bring-up, kernels, checks, the round's profile, BetterBench 46.4 / 490
SYCL_PROGRESS.md: the gdn fusion and row_topk commits, the repository's move (build trees, venv,
fonts.conf), the w4a16 model's kernels and their checks, the ESIMD compiler's mad fusion, how to
measure on this model (unitrace's v2-adapter blind spot, the v1 adapter, --profile-ops, the
BetterBench proxy), where a decode round goes, the acceptance analysis, next steps. README: the
current numbers and to-dos.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 01:19:14 +01:00
claudeandClaude Opus 5.5 13c64a3d78 libxe2: prefill attention on DPAS (flash attention) -- prefill 378 -> 468 tok/s at 2234 tokens
The SIMT kernel gives each (query row, kv head) a work-group and scores keys with f32
multiply-adds, so at a 2048-token chunk every row re-reads its keys and values: Qwen3.8-27B's 32
full-attention calls of a 2234-token prompt took 1.41 s (--profile-ops). The ESIMD form takes a work-
group per (8 query rows, kv head), a thread per query head, and shares each page of keys and values
among the 8 rows of all of them: Q K^T on bf16 DPAS with K^T from a transposed 2D load of the page
(a 16-token page is a DPAS's 16 keys), the online softmax in f32 over 32 keys a step, P rounded to
bf16 and P V on DPAS with V by a VNNI-transforming load. Q waits in local memory so the registers
hold the 8 x 256 f32 accumulator. Served for a single sequence's prefill (16+ rows), causal without
a window, bf16 query, cache and output, pages of 16, head_dim 256; everything else keeps the SIMT
kernel (XE2_ATTN_SIMT=1 forces it).

rad-kbench: qwen3.8-27b-w4a16-rtn 240/240 (the flash cases rel_l2 1.6-2.3e-3, tolerance 2e-2),
fixture attn* 237/237. Prefill: 2234 tokens 5.90 -> 4.78 s, 2475 tokens 481 tok/s; the summary of
a 2000-token prompt reads as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 01:08:41 +01:00
claudeandClaude Opus 5.5 2365a2ae51 libxe2: the w4a8i8 prefill GEMM tiled through local memory -- 27 -> 62-78 int8 TOPS, prefill 291 -> 378 tok/s
The first form gave each thread 32 rows by 32 columns in 256 registers and its own 2D loads of the
activation: 23-29 TOPS at M = 2048 (probe w4p.cpp), and the probe's breakdown put the time in the
activation loads, then the group epilogue (DPAS alone ran 120 TOPS). Now a work-group of 8 threads
shares 16 rows: each group's activation is staged in local memory once, double-buffered, a step
a 2D load; a thread owns 16 rows by 32 columns in 128 registers (8 threads an EU) and runs the
group's epilogue on whole [8 rows][16] blocks against factors broadcast once; for outputs wider than
8192 the work-groups go rows fastest, so one 256-column slice of the weight stays in L2 while every
row block uses it. TOPS at M = 2048: gate_up 27 -> 78, N 16384 K 5120 27 -> 75, down 24 -> 62,
N 5120 K 6144 29 -> 78. The chain is unchanged: still libref's result bit for bit (XE2_W4_CHECK on
the 27B: 0 of 349568, 327680 and 445696 outputs differ).

quant_act_i8g for bf16 rows in groups of 128 reads a lane's 8 values in one 16-byte load and stores
its 8 codes in one 8-byte store, typed (677 us a call at 2048 x 5120 through the generic accessors);
the same floats and rounding: rad-kbench fixture 153/153 and the 27B 96/96, rel_l2 0.

Prefill, 2234 tokens: 7.68 -> 5.90 s (378 tok/s).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 00:52:58 +01:00
claudeandClaude Opus 5.5 e85124c0f0 libxe2: the int8 lm_head in ESIMD -- 96 ms -> ~2.5 ms a call at N = 248320, K = 5120
An int4 release's head is int8 codes with a bf16 scale per (row, 128 of K), joined. head_dpas
reads E4M3 only, and its fallback walked a column a lane in f32: 96 ms a call, 35 of a decode
token's 61 ms (profile_decode.sh). The ESIMD form reads 16 columns' rows 16 bytes a lane (d32x4
gathers), turns a byte into fp16 exactly as (b ^ 0x80) | 0x6400 less 1152, paired (0, 2) and (1, 3)
as the fp8 path pairs its bytes so the prepass's activation serves both, and sums a 128-block on
fp16 DPAS scaled once. head_dpas leaves exactly this form to it (head_i8_fast); both read the
planes on the card.

rad-kbench on qwen3.8-27b-w4a16-rtn: logits_gemm 28/28 (worst rel_l2 1.7e-3, tolerance 8e-3).
Decode, story prompt with the MTP drafter: 15.0 -> 43.2 tok/s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 00:06:22 +01:00
claudeandClaude Opus 5.5 efdfc4a570 libxe2: the int4 W4A16 release's GEMMs -- w4a16_asym on fp16 DPAS, w4a8i8_asym on int8 DPAS, quant_act_i8g
For qwen3.8-27b-w4a16-rtn (u4 codes, f16 scale and u4 zero per 128 of K): the engine casts a
linear's input to f16 for gemm_nt_q at w4a16_asym up to 64 rows a step, and quantises it with
quant_act_i8g for w4a8i8_asym above. None had a device kernel.

- The planes are stored tiled at load (xe2_ops.h, w4_tiled): a 16-column tile's codes side by
  side, the even codes of each dword in its low half so (w >> 4s) & 0x000F000F is a VNNI pair, and
  the scale with f16(1024 + zero) one dword a (column, group). unrelayout inverts both exactly.
- gemm_nt_q_w4: libref's gemm_zp loop per output, the exact form (XE2_EXACT=1, XE2_W4_EXACT=1).
- w4a16_asym, M <= 64: ESIMD, a thread a tile; (code | 0x6400) less f16(1024 + zero) is
  code - zero exactly; eight fp16 DPAS of RC = 1, 2, 4 or 8 rows a group, scaled in f32 a group.
  Narrow outputs split K. Probe w4d.cpp, incompressible codes: gate_up (N 34816, K 5120) 173 us at
  M = 1 (546 GB/s), 190 us at M = 4.
- w4a8i8_asym: int8 DPAS takes the tiled codes as its u4 B operand (nibble i meets A's byte i), so
  a prepass reorders the activation's bytes of each 8 evens first and forms each group's sum of
  codes; the group's integer sum is exact and its term ((sum - zero * asum) * a_scale) * scale is
  added in group order.
- quant_act_i8g: quant_act_fp8's form at libref's int8 rule (top 127).

rad-kbench and the op oracle cannot draw the zero-point grids, so XE2_W4_CHECK=n checks the first
n calls of each form against libref's loop on the host, on the engine's operands. On the 27B: the
exact form 0 of 81920 and 0 of 25600 outputs differ; w4a8i8 (M = 2048) 0 of 349568 and 0 of 327680;
w4a16 (M = 4) 0 of 65536 and 2 of 20480 (bf16 ties, rel_l2 5e-9). quant_act_i8g: rad-kbench
fixture 153/153 (quant_act*), the 27B 96/96, rel_l2 0. ctest -L sycl 3/3; the host tier's five
failures are the baseline's (FFmpeg, CPU budgets).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 00:06:22 +01:00
claudeandClaude Opus 5.5 ab0175564b libxe2: ESIMD kernels compiled with the vector compiler's -ffp-contract=off
The vector compiler that builds ESIMD kernels forms a mad from a multiply and an add unless its
own API option says strict, whatever the front end's -ffp-contract: probe fmac.cpp's
t = (s * a) * b; c += t came back fused in 14062 of 65536 lanes, 0 with the option, and the SIMT
kernels are unaffected either way. An ESIMD epilogue that copies libref's chain (the w2a8 head's
group terms) was therefore exact only where no fusion happened to change a rounding.

ctest -L sycl on the B65: 3/3 (device_test_sycl, kbench, kbench_moe).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 00:06:22 +01:00
claudeandClaude Opus 5.5 2d1f168ec3 libxe2: row_topk filtered, one work-group a row -- 0.93 ms -> 37 us a round at R = 32 of 248320
The R-th largest of a row's 64 sub-group maxima is a lower bound on its R-th largest key (those
maxima are R distinct elements), so the row's top R are among the keys at or above it -- a few
dozen on real logits. A second read gathers them into local memory, and a survivor's place is the
count of survivors above it: the keys carry the column and are distinct, so that is the order the
serial passes produce. More than 4096 survivors (a row of equal values) takes the passes over the
row. bf16 rows are read 8 values a 16-byte load. XE2_TOPK_CHUNKS=1 keeps the two-stage form.

The two-stage form was 846 + 86 us a round (unitrace, M = 15, N = 248320, R = 32); this one 37 us.
rad-kbench against libref: fixture 21/21, Qwen3.8-27B-DFLASH2-PARO-M2XFP4 (R = 32) 14/14 and
qwen3.8-27b-w4a16-rtn (R = 1) 12/12, all at rel_l2 0; greedy output identical (8/8).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 22:55:01 +01:00
claudeandClaude Opus 5.5 1592580337 scripts/sycl, docs: BetterBench, its venv, Chromium and the runs under the repo's local/ (git-excluded)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-26 21:09:23 +01:00
claudeandClaude Opus 5.5 b7998146d7 scripts/sycl: BetterBench runs kept in the repo's radiance-bench/ (git-excluded), not ~/radiance-bench
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-26 21:06:10 +01:00
claudeandClaude Opus 5.5 7dd17c6488 libxe2: gdn recurrent update as one launch a step -- replay, token pass, gates and gated norm fused
A work-group a (sequence, v head), its V / 16 sub-groups the column blocks: the replay and the
token pass are ordered by a work-group barrier instead of a launch boundary, the replayed state
stays in registers instead of going to its slot and back, the gates are formed in the kernel and
the gated norm and fp8 group run at the end over outputs kept in local memory. Four launches a
layer (4.31 ms a round) -> one (3.76 ms). XE2_GDN_SPLIT=1 keeps the split form.

rad-kbench on the 27B: gdn_recurrent_update anchor q_len 4/8/16 rel_l2 0 against libref, 90/90 gdn
cases passed; greedy output identical (8/8).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-26 20:00:15 +01:00
claudeandClaude Opus 5.5 55db8c7c65 libxe2: gdn's gated norm a sub-group a (token, head) -- 31.8 -> 24.9 us a call
One wave of Tk * Hv threads with a row's V columns in each lane's registers, instead of a 128-item
work-group a row (~2.4 waves). The sum over e is the same chain in e order; the amax a maximum.
Greedy output identical (8/8).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-26 19:51:43 +01:00
claudeandClaude Opus 5.5 d87dd860ce libxe2: gdn recurrent state rows loaded and stored as a lane's own 16-byte vectors -- 50 -> 28 us a call
The 16-row block staged through local memory took 8.3 KB a 16-lane work-group, so only ~300 of the
384 work-groups fit the card at once and each phase ran in two waves (probe rec2.cpp: 39.6 vs 24.7
us for the 8-token pass). Same values into the same registers: greedy output identical (8/8); a
round's device time 75.8 -> 72.8 ms (unitrace, story prompt).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-26 19:35:14 +01:00
claudeandClaude Opus 5.5 2675dba42c docs: the w2a8 head on 2-bit DPAS, BetterBench 53.2 tok/s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-26 03:53:16 +01:00
claudeandClaude Opus 5.5 2a5e815a95 libxe2: w2a8 head -- 64 threads share the staged activation, a group's codes one load: 1.66 -> 0.74 ms
Work-groups of 16 threads staged the 40 KB activation into local memory for 16 tiles each; 64
threads amortise it over four times the columns (16: 1.66 ms, 32: 0.96), and a group of 128 reads
its four steps' codes as one 512-byte block load (32: 0.77, 64: 0.74 ms in the round, unitrace -d).

Checked as before: 20 calls on the engine's inputs against the SIMT GEMV, 0 of 1738240 outputs
differ each; greedy output identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-26 03:43:51 +01:00
claudeandClaude Opus 5.5 34ae231e97 libxe2: the w2a8 draft head on int8 DPAS with u2 B operands, codes tiled at load -- 2.56 -> 1.66 ms
This card's DPAS takes 2-bit B operands against s8 A, 16 codes a dword from the low end (probe
dpas_u2.cpp), so the drafter's 2-bit vocabulary head needs no decode: gemm_zp_layout stores the u2
codes tiled ("xe2.zp.u2.t16": a 16-column tile's 32-column step is 128 bytes, [dword][lane],
each dword the column's codes at the activation's stored positions -- quant_act_i8's step order is
folded into the layout), and an ESIMD kernel (xe2_gemm_zp_esimd.cpp) feeds them to DPAS as they
lie, against the activation staged in local memory as the A operand. Each group's sum is exact
in int32 and the terms are added in group order, as zp_dpas and libref do. The exact kernel and
the SIMT GEMV read the tiled form too.

Checked: 20 calls on the engine's real inputs, the ESIMD kernel against the SIMT GEMV on the same
bytes, 0 of 1738240 outputs differ each; greedy output identical (rad-kbench has no w2a8 recipe
on this container).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-26 03:18:30 +01:00
claudeandClaude Opus 5.5 5d09eb98b5 docs: the givens probe -- cold-table timings, stall profile, five variants, none taken
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-26 02:58:41 +01:00
claudeandClaude Opus 5.5 c2160c9e45 docs: the m2xfp4 planes tiled at load, quant_act_fp8, the launch floor and the null results, BetterBench 52.0 tok/s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-26 02:54:02 +01:00
claudeandClaude Opus 5.5 ed8e26c2fc libxe2: quant_act_fp8 a sub-group a (row, group) -- 49.6 -> 8.0 us at n=17408
A row's work-group walked its groups sixteen at a time, ~5 us a group of dependent loads,
reduction and stores. The groups are independent, so each sub-group now takes one (as
gated_quant_fp8 already does); the arithmetic is unchanged. rad-kbench against libref: 45 checked,
45 passed, rel_l2 0. Greedy output identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-26 02:20:16 +01:00
claudeandClaude Opus 5.5 dad30c6b59 libxe2: m2xfp4 meta and exponents tiled too, each column's max exponent stored at load -- gate_up 222 -> 205 us
Where N % 16 == 0 and K % 512 == 0 the meta bytes (in the codes blob) and the E8M0 plane (b_scale,
tag "xe2.m2.e8m0.t16") are stored in chunks of a tile's 16 groups, [dword][lane], so the ESIMD
kernel reads four steps of them with one block load each instead of gathers across 16 rows. The
exponent plane's stored form appends each column's largest exponent (int32), computed once at
load, so the prepass no longer scans the plane on every call; unrelayout drops it and untiles the
exponents exactly. Every m2 reader reads the tiled forms.

rad-kbench against libref: 70 checked, 70 passed (worst rel_l2 1.2e-3). M = 8: gate_up 222 -> 205,
down 119 -> 113 us; prefill shapes flat to -5%. Greedy output identical; 512-token decode 33.3 ->
33.9 tok/s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-26 02:06:52 +01:00
claudeandClaude Opus 5.5 68d510b1f4 libxe2: m2xfp4 codes stored tiled at load -- the verify GEMM's step one block load, gate_up 240 -> 222 us
Where N % 16 == 0 and K % 128 == 0 the layout hook asks for "xe2.m2.tiled16": a 16-column tile's
128-column step is 1 KiB, dword w of its columns side by side, the ESIMD kernel's [word][lane]
registers as they lie (four block loads in place of four d32x4 gathers). M = 1 goes to the same
kernel when tiled. Every m2 reader in libxe2 (exact, SIMT GEMV, jm and SIMT DPAS forms, prefill
decode) reads the tiled form; unrelayout inverts it for the oracle.

rad-kbench against libref: 70 checked, 70 passed (worst rel_l2 1.2e-3). M = 8: gate_up 240 -> 222,
down 140 -> 119, N=1024 50 -> 25 us. Greedy output identical (8 prompts x 64 tokens); 512-token
decode 31.8 -> 33.3 tok/s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-26 01:47:12 +01:00
claudeandClaude Opus 5.5 2a764d2d38 docs: stall profiles of the small kernels
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-25 15:20:05 +01:00
claudeandClaude Opus 5.5 640cc7e231 docs: the last-split reduction tried and dropped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-25 15:11:49 +01:00
claudeandClaude Opus 5.5 207b10b3c3 docs: the round on unitrace -- stall sampling, the 560 GB/s ceiling, fixes and null results, BetterBench 48.2 tok/s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-25 14:44:23 +01:00
claudeandClaude Opus 5.5 340231d007 libxe2: verify GEMM loads exponents and metadata four steps a gather -- down 142 -> 131 us
EU stall sampling (unitrace --stall-sampling) put 43% of the kernel's samples on send stalls, the
memory request queue full, not on waits for data: 4-byte gathers of the exponents and metadata
were a third of its cache-line requests for an eighth of its bytes. 16 bytes a lane now cover
four steps; a split's tail keeps the per-step gathers, so the arithmetic and splits are as
before. rad-kbench against libref 50/50; greedy output identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-25 14:21:03 +01:00
claudeandClaude Opus 5.5 70e50f4758 libxe2: w2a8 head stages its activation with every load before the local stores -- 2.81 -> 2.55 ms
The pair-a-step staging loaded through a generic pointer after each local store, one round trip
an iteration. Same arithmetic; greedy text and speculative round count unchanged (rad-kbench has
no recipe for the shape).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-25 13:53:52 +01:00
claudeandClaude Opus 5.5 1b2cc6d826 device/sycl: range copies stage host sources on the device first -- 650 us -> gone a step upload
The step upload's range kernel read its range list and sources from pinned host memory, a link
round trip a load (PCIe x1 on the B65): 3 calls a speculative round at 650 us. Their span and the
list now cross in one transfer each into a per-stream device buffer. device_test_sycl passes;
greedy output identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-25 13:28:00 +01:00
claudeandClaude Opus 5.5 36b8941096 libxe2: the verify GEMM's e_max in the prepass launch -- down 156 -> 142 us at M=8
The per-column largest exponent was a kernel of its own for split-K shapes (7.8 us a launch, 260
a round) and an in-kernel scan otherwise; extra work-groups of the activation prepass now form it
and the ESIMD kernel gathers it. rad-kbench against libref 50/50; greedy output identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-25 13:12:30 +01:00
claudeandClaude Opus 5.5 ef6c6e13fa docs: the verify GEMM in ESIMD, the gdn load order, what other repos do
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-25 11:13:28 +01:00
claudeandClaude Opus 5.5 fc1f2bba59 libxe2: the m2xfp4 verify GEMM in ESIMD -- gate_up 403 -> 256 us at M=8
A thread owns 16 columns as [word][lane] registers, so a decoded weight pair is one SIMD32 fp16
multiply instead of SIMT's ~10 instructions; the step's activation blocks load with the code
lines, so no DPAS waits on its own A load. rad-kbench against libref 50/50; greedy output
identical. XE2_M2_SIMT=1 keeps the SIMT kernel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-25 11:13:28 +01:00
claudeandClaude Opus 5.5 5010e1d083 libxe2: gdn recurrent update issues its state loads before the local stores -- 234 -> 166 us a call
The state pointer is generic, so IGC ordered every load behind the preceding local store and the
128 loads of a row block each paid a full memory round trip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-25 11:13:28 +01:00
claudeandClaude Opus 5.5 b5eef7e1ab test push as the claude user (empty commit, no changes)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-24 19:35:24 +02:00
claudeandClaude Opus 5.5 cbe1a74716 test push (empty commit, no changes)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-24 19:29:08 +02:00
claudeandClaude Opus 5.5 a613a1a3e1 README: the Intel GPU (SYCL) backend -- state, numbers, to-dos, build and run
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-24 19:27:48 +02:00
claudeandClaude Opus 5.5 1afb9de4e9 docs: status after the round and prefill work -- 35-37 tok/s decode, 349 tok/s prefill on the 27B
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-24 19:16:13 +02:00
claudeandClaude Opus 5.5 55a1e9f110 libxe2: gdn_conv_prep's conv and l2 norm typed for bf16 -- 0.46 -> 0.26 s a 1882-token prefill
The conv takes typed loads and stores when its operands are bf16 (the engine's), and the l2 norm
over each 128-wide q/k head is a sub-group's: its values loaded 8 a lane, the squares added in d
order by lane broadcasts -- libref's chain -- instead of a work-item walking the head twice through
the generic accessors. Fixture 90/90 at rel_l2 0. Prefill 336 tok/s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-24 19:07:36 +02:00
claudeandClaude Opus 5.5 672d49d07e docs: KL of the oneMKL prefill path against the exact reference
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-24 18:59:47 +02:00
claudeandClaude Opus 5.5 ecf8bf547a libxe2: gdn_conv_prep a work-item a (token, channel) and gdn_gated_rmsnorm's row staged -- 0.54 -> 0.46 and 0.38 -> 0.20 s a 1882-token prefill
conv_prep walked each channel through every token (10240 chains of 1882) and the gate cumsum on 48
work-items; every (token, channel) output is independent and the cumsum restarts each chunk, so
they now take a work-item a (token, channel) and a (head, chunk). The gated RMS norm's work-item 0
summed its row from global memory one load at a time; the row is staged in local memory first.
Same expressions and order: fixture 90/90 at rel_l2 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-24 18:51:28 +02:00
claudeandClaude Opus 5.5 b40dfb8e8e 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
2026-10-24 18:51:10 +02:00
claudeandClaude Opus 5.5 bbc7607222 libxe2: rmsnorm_quant_fp8 keeps a row's values in registers -- 0.30 -> 0.16 s a 1882-token prefill
A sub-group now loads the 128-groups it later quantises, so the normed inputs and the gain stay in
its registers between the ordered sum and the codes; only the squares go to local memory. Three
n-wide arrays (60 KB at n = 5120) allowed two rows on a Xe core at once, and a row's sum is a
serial chain, so the prefill's 941-row calls ran as ~24 waves of it. Bit-identical: fixture 20/20
and 400/400 live oracle issues at rel 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-24 17:57:05 +02:00
claudeandClaude Opus 5.5 a7868f37f3 libxe2: givens_dense_quant in one register-DPAS pass at every row count -- 0.74 -> 0.52 s a 1882-token prefill
The prefill rotation ran three passes (an fp16 copy of the input, a strided batch GEMM, the
quantiser) over sizeable intermediates. The decode form -- a (part, group)'s rotation on dpas_f16
with the quantiser after it -- now takes any row count, a work-group a 16-row block. The same
arithmetic as the batched form (fp16 input, f32 sums): 200/200 live oracle issues agree (rel at
most 4.5e-3, p99 5.6e-4). XE2_GIVENS_BATCHED=1 keeps the three-pass form. Prefill 316 tok/s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-24 17:51:42 +02:00
claudeandClaude Opus 5.5 9da46ab7fe libxe2: prefill GEMMs on oneMKL -- 27B prefill 208 -> 305 tok/s
oneMKL's SYCL GEMM (part of oneAPI; libxe2 links it when CMake finds it, RAD_XE2_MKL=OFF or
XE2_NO_MKL=1 keep the hand-written kernels) runs the fp16 prefill GEMMs at 85-91 TFLOPS on random
data at the 27B's shapes, deterministic run to run, against ~23-30 for the hand-tiled XMX kernel:
xmx_f16_scaled (the m2xfp4 prefill) and xmx_f16_batched (the rotation's) go to its gemm and
gemm_batch, and bf16 gemm_nt at M >= 17 to its bf16 GEMM (N = 96 had fallen to the exact kernel,
5 ms a call). The m2xfp4 weight decode to fp16 now takes a (column, 32-group) a work-item. fp16 or
bf16 products with f32 accumulation, as before: the 27B's cases 133/133 (rel_l2 <= 1.42e-3), the
fixture 1410/1410. Prefill GEMMs over a 1882-token prompt 4.06 -> 1.66 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-24 17:49:44 +02:00
claudeandClaude Opus 5.5 b66b1243d2 libxe2: gdn_kkt_solve on 512 work-items -- 0.45 -> 0.33 s a 1882-token prefill
Two of its 48 KB work-groups fit a Xe core; 512 work-items each fill its threads. Same chains:
fixture 90/90 at rel_l2 0. 27B prefill (1882 tokens) now 202 tok/s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-24 16:34:12 +02:00
claudeandClaude Opus 5.5 9a9c831f79 libxe2: gdn_chunk_scan on 1024 work-items a work-group -- 2.68 -> 0.92 s a 1882-token prefill
The chain-parallel scan's ~124 KB of local memory leaves one work-group a Xe core, and at 256
work-items that left three quarters of the core's threads idle. Every phase is a set of independent
chains strided by the work-group size, so the work-group is now the core's 1024: the same chains in
the same order, fixture 90/90 and 72/72 on the 27B at rel_l2 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-24 16:30:37 +02:00
claudeandClaude Opus 5.5 1a61aac915 libxe2: gdn_kkt_solve a work-group a chunk, row terms spread over 256 work-items -- 1.51 -> 0.45 s a 1882-token prefill
kkt walked a head's chunks and rows in turn on 48 work-groups, its working rows in global
memory. Chunks are independent here: a work-group now takes one (sequence, head, chunk) with the
chunk's k rows in local memory, forms every row term beta_i (k_i . k_j) e^{g_i - g_j} first (each
its sum over d in order, 256 work-items), then solves row by row from local memory. libref's chains
and order: fixture 90/90 at rel_l2 0. (Measured on the way: the double exp is not the cost; k as
f32 in local memory halves the resident work-groups and is slower.)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-24 16:21:01 +02:00
claudeandClaude Opus 5.5 905a7ec242 libxe2: gdn_chunk_scan with typed loads for the engine's bf16/f32 operands -- 4.8 -> 2.7 s a 1882-token prefill
The chain-parallel scan staged each chunk's k, q, v, A, g and beta through the generic accessors
(a dtype switch an element); bf16 q/k/v/A/o with f32 g, beta and states now take typed loads and
stores. Same arithmetic: fixture 90/90 at rel_l2 0. 27B prefill 131 -> 153 tok/s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-24 15:55:38 +02:00
claudeandClaude Opus 5.5 99fb3108cd libxe2: the w2a8 draft head on register int8 DPAS -- 4.2 -> 3.05 ms a round
dpas_s8u8 (xe2_common.h: SPV_INTEL_subgroup_matrix_multiply_accumulate's int8 form, K = 32, A
signed, B unsigned; layout checked in a probe) takes a lane's column of codes as B straight from
registers, so the group sums no longer go through a local-memory tile and two sub-group barriers a
step; the activation is staged once a work-group as A columns, and a step's codes are one 8- or
16-byte load. The group terms are libref's, in order, as before: bit-identical to the
libref-checked sub-group form on 50/50 live calls (a temporary cross-check), fixture 228/228.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-24 15:46:35 +02:00
claudeandClaude Opus 5.5 531146b4e8 libxe2: split-KV attention keeps 64 keys a partition and skips the empty ones -- 212 -> 114 us a verify call
At a verify's 8 rows and a ~300-token context the 32 partitions held ~10 keys each, and every one
loaded the query, wrote a full state and was merged. A partition now takes at least 64 keys; the
ones past a row's keys write only an end marker (l = -1) and return, and the merge stops at it.
Tolerance-held as before: fixture 158/158 (rel_l2 <= 2.9e-4), the 27B 124/124.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-24 15:23:51 +02:00
claudeandClaude Opus 5.5 5092098123 libxe2: gdn_conv_update with typed loads for bf16 operands -- the fused update 272 -> 238 us a verify call
The conv's per-element generic accessors (a dtype switch each) cost it ~60 us at 8 tokens; the
engine's operands are all bf16, which now take a typed copy of the same loop (libref's double exp
in silu kept). Bit-identical: 252/252 live gdn_conv_recurrent_update and 48/48 gdn_conv_prep oracle
issues at tolerance 1e-9, fixture 90/90. XE2_GDN_GENERIC=1 keeps the generic forms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-24 14:59:05 +02:00