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
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
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
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
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