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 -1
View File
@@ -85,6 +85,8 @@ __attribute__((weak)) int halo_rad_attn_prefill_h64_gqa4_fp8(const RadArgs*, Rad
__attribute__((weak)) int64_t halo_rad_attn_prefill_h64_gqa4_scratch(const RadArgs*) { return -1; }
__attribute__((weak)) int halo_rad_attn_window_h128_gqa1_bf16(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_window_h128_gqa1_fp8(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_window_h128_gqa4_bf16(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_window_h128_gqa4_fp8(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_window_h256_gqa1_bf16(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_window_h256_gqa1_fp8(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_window_h256_gqa2_bf16(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
@@ -110,4 +112,4 @@ __attribute__((weak)) int halo_rad_attn_window_h512_gqa8_fp8(const RadArgs*, Rad
* list is the only place that knows which hooks are still stubs, and it is generated from the same
* scan as the bodies above, so a unit that lands a real hook drops its name here on the next run.
* halo_selftest reads it through libhalo/halo_selftest.cpp's `hook()`. */
extern "C" const char* halo_stub_hooks(void) { return "halo_gemm_fp8a8_pin_nt halo_mla_matrix_stats halo_qsa_select_pin_form halo_rad_attn_decode_gq_h256_gqa12_bf16 halo_rad_attn_decode_gq_h256_gqa12_fp8 halo_rad_attn_decode_gq_h256_gqa12_fp8v4 halo_rad_attn_decode_gq_h256_gqa12_k6v4 halo_rad_attn_decode_gq_h256_gqa6_bf16 halo_rad_attn_decode_gq_h256_gqa6_fp8 halo_rad_attn_decode_gq_h256_gqa6_fp8v4 halo_rad_attn_decode_gq_h256_gqa6_k6v4 halo_rad_attn_decode_h128_gqa1_bf16 halo_rad_attn_decode_h128_gqa1_fp8 halo_rad_attn_decode_h128_gqa1_scratch halo_rad_attn_decode_h128_gqa2_bf16 halo_rad_attn_decode_h128_gqa2_fp8 halo_rad_attn_decode_h128_gqa2_scratch halo_rad_attn_decode_h128_gqa8_bf16 halo_rad_attn_decode_h128_gqa8_fp8 halo_rad_attn_decode_h128_gqa8_scratch halo_rad_attn_decode_h256_gqa12_bf16 halo_rad_attn_decode_h256_gqa12_fp8 halo_rad_attn_decode_h256_gqa12_fp8v4 halo_rad_attn_decode_h256_gqa12_fp8v4_scratch halo_rad_attn_decode_h256_gqa12_k6v4 halo_rad_attn_decode_h256_gqa12_k6v4_scratch halo_rad_attn_decode_h256_gqa12_scratch halo_rad_attn_decode_h256_gqa4_bf16 halo_rad_attn_decode_h256_gqa4_fp8 halo_rad_attn_decode_h256_gqa4_scratch halo_rad_attn_decode_h256_gqa6_bf16 halo_rad_attn_decode_h256_gqa6_fp8 halo_rad_attn_decode_h256_gqa6_fp8v4 halo_rad_attn_decode_h256_gqa6_fp8v4_scratch halo_rad_attn_decode_h256_gqa6_k6v4 halo_rad_attn_decode_h256_gqa6_k6v4_scratch halo_rad_attn_decode_h256_gqa6_scratch halo_rad_attn_decode_h256_gqa8_bf16 halo_rad_attn_decode_h256_gqa8_fp8 halo_rad_attn_decode_h256_gqa8_scratch halo_rad_attn_prefill_h128_gqa1_bf16 halo_rad_attn_prefill_h128_gqa1_fp8 halo_rad_attn_prefill_h128_gqa1_scratch halo_rad_attn_prefill_h128_gqa2_bf16 halo_rad_attn_prefill_h128_gqa2_fp8 halo_rad_attn_prefill_h128_gqa2_scratch halo_rad_attn_prefill_h128_gqa8_bf16 halo_rad_attn_prefill_h128_gqa8_fp8 halo_rad_attn_prefill_h128_gqa8_scratch halo_rad_attn_prefill_h256_gqa12_bf16 halo_rad_attn_prefill_h256_gqa12_fp8 halo_rad_attn_prefill_h256_gqa12_fp8v4 halo_rad_attn_prefill_h256_gqa12_fp8v4_scratch halo_rad_attn_prefill_h256_gqa12_k6v4 halo_rad_attn_prefill_h256_gqa12_k6v4_scratch halo_rad_attn_prefill_h256_gqa12_scratch halo_rad_attn_prefill_h256_gqa4_bf16 halo_rad_attn_prefill_h256_gqa4_fp8 halo_rad_attn_prefill_h256_gqa4_scratch halo_rad_attn_prefill_h256_gqa6_bf16 halo_rad_attn_prefill_h256_gqa6_fp8 halo_rad_attn_prefill_h256_gqa6_fp8v4 halo_rad_attn_prefill_h256_gqa6_fp8v4_scratch halo_rad_attn_prefill_h256_gqa6_k6v4 halo_rad_attn_prefill_h256_gqa6_k6v4_scratch halo_rad_attn_prefill_h256_gqa6_scratch halo_rad_attn_prefill_h256_gqa8_bf16 halo_rad_attn_prefill_h256_gqa8_fp8 halo_rad_attn_prefill_h256_gqa8_scratch halo_rad_attn_prefill_h64_gqa4_bf16 halo_rad_attn_prefill_h64_gqa4_fp8 halo_rad_attn_prefill_h64_gqa4_scratch halo_rad_attn_window_h128_gqa1_bf16 halo_rad_attn_window_h128_gqa1_fp8 halo_rad_attn_window_h256_gqa1_bf16 halo_rad_attn_window_h256_gqa1_fp8 halo_rad_attn_window_h256_gqa2_bf16 halo_rad_attn_window_h256_gqa2_fp8 halo_rad_attn_window_h256_gqa4_bf16 halo_rad_attn_window_h256_gqa4_fp8 halo_rad_attn_window_h256_gqa8_bf16 halo_rad_attn_window_h256_gqa8_fp8 halo_rad_attn_window_h512_gqa1_bf16 halo_rad_attn_window_h512_gqa1_fp8 halo_rad_attn_window_h512_gqa2_bf16 halo_rad_attn_window_h512_gqa2_fp8 halo_rad_attn_window_h512_gqa4_bf16 halo_rad_attn_window_h512_gqa4_fp8 halo_rad_attn_window_h512_gqa8_bf16 halo_rad_attn_window_h512_gqa8_fp8"; }
extern "C" const char* halo_stub_hooks(void) { return "halo_gemm_fp8a8_pin_nt halo_mla_matrix_stats halo_qsa_select_pin_form halo_rad_attn_decode_gq_h256_gqa12_bf16 halo_rad_attn_decode_gq_h256_gqa12_fp8 halo_rad_attn_decode_gq_h256_gqa12_fp8v4 halo_rad_attn_decode_gq_h256_gqa12_k6v4 halo_rad_attn_decode_gq_h256_gqa6_bf16 halo_rad_attn_decode_gq_h256_gqa6_fp8 halo_rad_attn_decode_gq_h256_gqa6_fp8v4 halo_rad_attn_decode_gq_h256_gqa6_k6v4 halo_rad_attn_decode_h128_gqa1_bf16 halo_rad_attn_decode_h128_gqa1_fp8 halo_rad_attn_decode_h128_gqa1_scratch halo_rad_attn_decode_h128_gqa2_bf16 halo_rad_attn_decode_h128_gqa2_fp8 halo_rad_attn_decode_h128_gqa2_scratch halo_rad_attn_decode_h128_gqa8_bf16 halo_rad_attn_decode_h128_gqa8_fp8 halo_rad_attn_decode_h128_gqa8_scratch halo_rad_attn_decode_h256_gqa12_bf16 halo_rad_attn_decode_h256_gqa12_fp8 halo_rad_attn_decode_h256_gqa12_fp8v4 halo_rad_attn_decode_h256_gqa12_fp8v4_scratch halo_rad_attn_decode_h256_gqa12_k6v4 halo_rad_attn_decode_h256_gqa12_k6v4_scratch halo_rad_attn_decode_h256_gqa12_scratch halo_rad_attn_decode_h256_gqa4_bf16 halo_rad_attn_decode_h256_gqa4_fp8 halo_rad_attn_decode_h256_gqa4_scratch halo_rad_attn_decode_h256_gqa6_bf16 halo_rad_attn_decode_h256_gqa6_fp8 halo_rad_attn_decode_h256_gqa6_fp8v4 halo_rad_attn_decode_h256_gqa6_fp8v4_scratch halo_rad_attn_decode_h256_gqa6_k6v4 halo_rad_attn_decode_h256_gqa6_k6v4_scratch halo_rad_attn_decode_h256_gqa6_scratch halo_rad_attn_decode_h256_gqa8_bf16 halo_rad_attn_decode_h256_gqa8_fp8 halo_rad_attn_decode_h256_gqa8_scratch halo_rad_attn_prefill_h128_gqa1_bf16 halo_rad_attn_prefill_h128_gqa1_fp8 halo_rad_attn_prefill_h128_gqa1_scratch halo_rad_attn_prefill_h128_gqa2_bf16 halo_rad_attn_prefill_h128_gqa2_fp8 halo_rad_attn_prefill_h128_gqa2_scratch halo_rad_attn_prefill_h128_gqa8_bf16 halo_rad_attn_prefill_h128_gqa8_fp8 halo_rad_attn_prefill_h128_gqa8_scratch halo_rad_attn_prefill_h256_gqa12_bf16 halo_rad_attn_prefill_h256_gqa12_fp8 halo_rad_attn_prefill_h256_gqa12_fp8v4 halo_rad_attn_prefill_h256_gqa12_fp8v4_scratch halo_rad_attn_prefill_h256_gqa12_k6v4 halo_rad_attn_prefill_h256_gqa12_k6v4_scratch halo_rad_attn_prefill_h256_gqa12_scratch halo_rad_attn_prefill_h256_gqa4_bf16 halo_rad_attn_prefill_h256_gqa4_fp8 halo_rad_attn_prefill_h256_gqa4_scratch halo_rad_attn_prefill_h256_gqa6_bf16 halo_rad_attn_prefill_h256_gqa6_fp8 halo_rad_attn_prefill_h256_gqa6_fp8v4 halo_rad_attn_prefill_h256_gqa6_fp8v4_scratch halo_rad_attn_prefill_h256_gqa6_k6v4 halo_rad_attn_prefill_h256_gqa6_k6v4_scratch halo_rad_attn_prefill_h256_gqa6_scratch halo_rad_attn_prefill_h256_gqa8_bf16 halo_rad_attn_prefill_h256_gqa8_fp8 halo_rad_attn_prefill_h256_gqa8_scratch halo_rad_attn_prefill_h64_gqa4_bf16 halo_rad_attn_prefill_h64_gqa4_fp8 halo_rad_attn_prefill_h64_gqa4_scratch halo_rad_attn_window_h128_gqa1_bf16 halo_rad_attn_window_h128_gqa1_fp8 halo_rad_attn_window_h128_gqa4_bf16 halo_rad_attn_window_h128_gqa4_fp8 halo_rad_attn_window_h256_gqa1_bf16 halo_rad_attn_window_h256_gqa1_fp8 halo_rad_attn_window_h256_gqa2_bf16 halo_rad_attn_window_h256_gqa2_fp8 halo_rad_attn_window_h256_gqa4_bf16 halo_rad_attn_window_h256_gqa4_fp8 halo_rad_attn_window_h256_gqa8_bf16 halo_rad_attn_window_h256_gqa8_fp8 halo_rad_attn_window_h512_gqa1_bf16 halo_rad_attn_window_h512_gqa1_fp8 halo_rad_attn_window_h512_gqa2_bf16 halo_rad_attn_window_h512_gqa2_fp8 halo_rad_attn_window_h512_gqa4_bf16 halo_rad_attn_window_h512_gqa4_fp8 halo_rad_attn_window_h512_gqa8_bf16 halo_rad_attn_window_h512_gqa8_fp8"; }