This repository has been archived on 2026-11-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
DokterSmol 1f00224501 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.
2026-11-17 18:12:32 +01:00

116 lines
15 KiB
C++

/* halo_stubs.cpp -- GENERATED by libhalo/gen_stubs.py; do not edit by hand.
*
* One weak body per hook libhalo/halo_plugin.h or libhalo/halo.h declares whose definition is not
* in a source libhalo/CMakeLists.txt compiles yet. Every body is __attribute__((weak)), so a real
* definition in any unit overrides it at link time and this file never has to be edited while a
* port lands: run gen_stubs.py when the set of units changes, not per unit. An unimplemented
* launch or init returns RAD_E_UNSUPPORTED, so a row that resolves to it fails by name at first
* use instead of at dlopen. The line count is the parity scoreboard: done means zero. */
#include "halo_plugin.h"
#include "halo.h" /* the C entries' types (HaloArgs, hipStream_t); this file is
scaffolding, not one of the ROCm-free declaration sources */
extern "C" __attribute__((weak)) void halo_gemm_fp8a8_pin_nt(int) {}
extern "C" __attribute__((weak)) void halo_mla_matrix_stats(unsigned long long*) {}
extern "C" __attribute__((weak)) void halo_qsa_select_pin_form(int) {}
__attribute__((weak)) int halo_rad_attn_decode_gq_h256_gqa12_bf16(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_decode_gq_h256_gqa12_fp8(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_decode_gq_h256_gqa12_fp8v4(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_decode_gq_h256_gqa12_k6v4(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_decode_gq_h256_gqa6_bf16(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_decode_gq_h256_gqa6_fp8(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_decode_gq_h256_gqa6_fp8v4(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_decode_gq_h256_gqa6_k6v4(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_decode_h128_gqa1_bf16(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_decode_h128_gqa1_fp8(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int64_t halo_rad_attn_decode_h128_gqa1_scratch(const RadArgs*) { return 0; }
__attribute__((weak)) int halo_rad_attn_decode_h128_gqa2_bf16(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_decode_h128_gqa2_fp8(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int64_t halo_rad_attn_decode_h128_gqa2_scratch(const RadArgs*) { return 0; }
__attribute__((weak)) int halo_rad_attn_decode_h128_gqa8_bf16(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_decode_h128_gqa8_fp8(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int64_t halo_rad_attn_decode_h128_gqa8_scratch(const RadArgs*) { return 0; }
__attribute__((weak)) int halo_rad_attn_decode_h256_gqa12_bf16(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_decode_h256_gqa12_fp8(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_decode_h256_gqa12_fp8v4(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int64_t halo_rad_attn_decode_h256_gqa12_fp8v4_scratch(const RadArgs*) { return 0; }
__attribute__((weak)) int halo_rad_attn_decode_h256_gqa12_k6v4(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int64_t halo_rad_attn_decode_h256_gqa12_k6v4_scratch(const RadArgs*) { return 0; }
__attribute__((weak)) int64_t halo_rad_attn_decode_h256_gqa12_scratch(const RadArgs*) { return 0; }
__attribute__((weak)) int halo_rad_attn_decode_h256_gqa4_bf16(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_decode_h256_gqa4_fp8(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int64_t halo_rad_attn_decode_h256_gqa4_scratch(const RadArgs*) { return 0; }
__attribute__((weak)) int halo_rad_attn_decode_h256_gqa6_bf16(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_decode_h256_gqa6_fp8(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_decode_h256_gqa6_fp8v4(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int64_t halo_rad_attn_decode_h256_gqa6_fp8v4_scratch(const RadArgs*) { return 0; }
__attribute__((weak)) int halo_rad_attn_decode_h256_gqa6_k6v4(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int64_t halo_rad_attn_decode_h256_gqa6_k6v4_scratch(const RadArgs*) { return 0; }
__attribute__((weak)) int64_t halo_rad_attn_decode_h256_gqa6_scratch(const RadArgs*) { return 0; }
__attribute__((weak)) int halo_rad_attn_decode_h256_gqa8_bf16(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_decode_h256_gqa8_fp8(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int64_t halo_rad_attn_decode_h256_gqa8_scratch(const RadArgs*) { return 0; }
__attribute__((weak)) int halo_rad_attn_prefill_h128_gqa1_bf16(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_prefill_h128_gqa1_fp8(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int64_t halo_rad_attn_prefill_h128_gqa1_scratch(const RadArgs*) { return -1; }
__attribute__((weak)) int halo_rad_attn_prefill_h128_gqa2_bf16(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_prefill_h128_gqa2_fp8(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int64_t halo_rad_attn_prefill_h128_gqa2_scratch(const RadArgs*) { return -1; }
__attribute__((weak)) int halo_rad_attn_prefill_h128_gqa8_bf16(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_prefill_h128_gqa8_fp8(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int64_t halo_rad_attn_prefill_h128_gqa8_scratch(const RadArgs*) { return -1; }
__attribute__((weak)) int halo_rad_attn_prefill_h256_gqa12_bf16(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_prefill_h256_gqa12_fp8(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_prefill_h256_gqa12_fp8v4(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int64_t halo_rad_attn_prefill_h256_gqa12_fp8v4_scratch(const RadArgs*) { return -1; }
__attribute__((weak)) int halo_rad_attn_prefill_h256_gqa12_k6v4(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int64_t halo_rad_attn_prefill_h256_gqa12_k6v4_scratch(const RadArgs*) { return -1; }
__attribute__((weak)) int64_t halo_rad_attn_prefill_h256_gqa12_scratch(const RadArgs*) { return -1; }
__attribute__((weak)) int halo_rad_attn_prefill_h256_gqa4_bf16(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_prefill_h256_gqa4_fp8(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int64_t halo_rad_attn_prefill_h256_gqa4_scratch(const RadArgs*) { return -1; }
__attribute__((weak)) int halo_rad_attn_prefill_h256_gqa6_bf16(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_prefill_h256_gqa6_fp8(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_prefill_h256_gqa6_fp8v4(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int64_t halo_rad_attn_prefill_h256_gqa6_fp8v4_scratch(const RadArgs*) { return -1; }
__attribute__((weak)) int halo_rad_attn_prefill_h256_gqa6_k6v4(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int64_t halo_rad_attn_prefill_h256_gqa6_k6v4_scratch(const RadArgs*) { return -1; }
__attribute__((weak)) int64_t halo_rad_attn_prefill_h256_gqa6_scratch(const RadArgs*) { return -1; }
__attribute__((weak)) int halo_rad_attn_prefill_h256_gqa8_bf16(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_prefill_h256_gqa8_fp8(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int64_t halo_rad_attn_prefill_h256_gqa8_scratch(const RadArgs*) { return -1; }
__attribute__((weak)) int halo_rad_attn_prefill_h64_gqa4_bf16(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_prefill_h64_gqa4_fp8(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__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; }
__attribute__((weak)) int halo_rad_attn_window_h256_gqa2_fp8(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_window_h256_gqa4_bf16(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_window_h256_gqa4_fp8(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_window_h256_gqa8_bf16(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_window_h256_gqa8_fp8(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_window_h512_gqa1_bf16(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_window_h512_gqa1_fp8(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_window_h512_gqa2_bf16(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_window_h512_gqa2_fp8(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_window_h512_gqa4_bf16(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_window_h512_gqa4_fp8(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_window_h512_gqa8_bf16(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
__attribute__((weak)) int halo_rad_attn_window_h512_gqa8_fp8(const RadArgs*, RadStream) { return RAD_E_UNSUPPORTED; }
/* The hooks this file still stubs, space separated, empty when the port is complete.
*
* A weak no-op body is RESOLVED, so a dlsym of a test hook answers even though the plugin does not
* implement it -- and a pinned-form test built on that answer asserts about a pin that pins
* nothing (a vacuous pass, or one spurious FAILure per form when the row itself is a stub). This
* 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_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"; }