libhalo: windowed attention at head_dim 128 with 4 queries per kv head, and the row-form names of rope and rmsnorm

What LFM3 needs on gfx1151 beyond the rows libhalo has. The window kernel is
instantiated at (128, 4) as in libr4d: the decode leg keeps q_len <= 16 and
every longer q_len, windowed or not, lands on the new pair. rope_rows and
rmsnorm_rows are registered under their row-form names and launched as rope
and rmsnorm, as libavx and libref register them, so a plugin written for
libr4d's row forms resolves on this part instead of falling to the host.

Emulator cases as libr4d's (split verify, ragged window, fp8, non-causal with
a missing block, WMMA prefill with and without the window) and selftest
launches.
This commit is contained in:
DokterSmol authored and StillDeadcode committed 2026-11-17 18:12:32 +01:00
1 parent 21c4544b61
commit 1f00224501
7 files changed
+74 -8

No files matched your search

+3 -2
View File
@@ -1911,8 +1911,9 @@ fails. `partial_rotary_factor` is read per attention class, so either class may
Kernels: libref and libavx serve every op, and so does libr4d: attention at (128, 4 queries a
kv head) takes `attn_decode_h128_gqa4` up to 16 query rows and `attn_window_h128_gqa4` past
that, for the full layers (window 0) as for the sliding ones. libhalo has no `rope_rows` or
`rmsnorm_rows`, so on gfx1151 those run on the host.
that, for the full layers (window 0) as for the sliding ones. libhalo carries the same pair of
attention rows, and `rope_rows` and `rmsnorm_rows` under their row-form names (launched as
`rope` and `rmsnorm`).
Checked against the reference's float32 forward on a tiny random LFM3 (conv, full, conv, sliding;
window 8) at every position of the golden prompt (`tests/lfm3_golden.h`, made by