From 899d1b1b3a65bb503f1037cb17950accf43b8a61 Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Mon, 19 Oct 2026 09:17:56 +0200 Subject: [PATCH] metal: restore the stubs for gemm_iq_f16_grouped, native_q8_0_sm60_pack/_release and swiglu_split_f16 (CUDA-only paths the Metal engine links but never runs) The Metal engine did not link from f-020-int: prefill.cpp and native_head.cpp reference these four entry points. All answer 'nothing done'. --- metal/src/engine/stubs_0145.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/metal/src/engine/stubs_0145.cpp b/metal/src/engine/stubs_0145.cpp index 9cb03195..0c1976f6 100644 --- a/metal/src/engine/stubs_0145.cpp +++ b/metal/src/engine/stubs_0145.cpp @@ -142,3 +142,10 @@ namespace strata::prefill { void gr_norm(float const* p0, float const* p1, float namespace strata::prefill { void gr_norm_rs(float const* p0, float const* p1, float p2, float* p3, unsigned short* p4, long long p5, void* p6, unsigned short* p7, long long p8, bool p9) { strata::metal_engine::missing("strata::prefill::gr_norm_rs"); } } namespace strata::prefill { void gr_write_cvec_norm_rs(float* p0, float const* p1, float const* p2, long long p3, float const* p4, float const* p5, int const* p6, int p7, float const* p8, float p9, float* p10, unsigned short* p11, long long p12, void* p13, unsigned short* p14, long long p15, bool p16) { strata::metal_engine::missing("strata::prefill::gr_write_cvec_norm_rs"); } } namespace strata::prefill { void gr_write_norm_rs(float* p0, float const* p1, float const* p2, long long p3, float const* p4, float p5, float* p6, unsigned short* p7, long long p8, void* p9, unsigned short* p10, long long p11, bool p12) { strata::metal_engine::missing("strata::prefill::gr_write_norm_rs"); } } +// pf_wmma (STRATA_PF_WMMA=1, Volta prompt experts) is CUDA only; the prefill code of 148/149 references it, so the Metal link needs the entry point. Off on Metal: "not launched". +namespace strata::kernels { bool gemm_iq_f16_grouped(int p0, void const* p1, unsigned long p2, int p3, int p4, void const* p5, int p6, int const* p7, int p8, int p9, float* p10, int p11, void* p12) { return false; } } +// STRATA_Q8_SM60 (Pascal GP100, opt-in): a no-op on Metal; NativeHead::load()/unload() call these for a Q8_0 head, so they must exist and answer "nothing packed". +namespace strata::kernels { bool native_q8_0_sm60_pack(void const* p0, int p1, int p2, char const* p3) { return false; } } +namespace strata::kernels { void native_q8_0_sm60_release(void const* p0) { } } +// only reached with pf_wmma (off on Metal) +namespace strata::prefill { void swiglu_split_f16(float const* p0, unsigned short* p1, long long p2, int p3, bool p4, void* p5) { } }