From 4dbaf703fdf123daa8e90a2bc659c0aab8ec8e2b Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Thu, 5 Nov 2026 18:54:42 +0100 Subject: [PATCH] Strix Halo (gfx1151, Windows): the K-quant prompt experts of UD-Q4_K_XL (Q4_K / Q5_K gate/up, Q5_1 / Q8_0 down) take the fused F16 matrix-core kernels by default (STRATA_PF_FUSED_KQ=0 or STRATA_GFX1151_DEFAULTS=0 keeps the earlier route). Setup config, n=1: 8K prompt 885 -> 1,387 tok/s, 4K 611 -> 1,316; first-token KL against the earlier route 1e-5 .. 6e-2 on prompts of 1K+ tokens (information), same greedy ids --- src/prefill/moe_fused_iq.cu | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/prefill/moe_fused_iq.cu b/src/prefill/moe_fused_iq.cu index 0b88f835a4..6d96067d94 100644 --- a/src/prefill/moe_fused_iq.cu +++ b/src/prefill/moe_fused_iq.cu @@ -1861,7 +1861,20 @@ const DevInfo& dev_info() { bool kq_on() { static const bool on = [] { const char* v = std::getenv("STRATA_PF_FUSED_KQ"); - return v != nullptr && v[0] == '1'; + if (v != nullptr && v[0] != '\0') return v[0] == '1'; +#if defined(__HIPCC__) && defined(_WIN32) + // Round 0215 (STRIX-FIT): on a Strix Halo (gfx1151) under Windows the K-quant experts of UD-Q4_K_XL (Q4_K / Q5_K gate/up, Q5_1 / Q8_0 down) + // take the fused matrix-core kernels (the F16 ones with STRATA_PF_F16=1, which the gfx1151 prompt set turns on) by default. + // STRATA_PF_FUSED_KQ=0 or STRATA_GFX1151_DEFAULTS=0 keeps the earlier route. + const char* off = std::getenv("STRATA_GFX1151_DEFAULTS"); + if (off != nullptr && off[0] == '0') return false; + int dev = 0; + cudaDeviceProp prop; + if (cudaGetDevice(&dev) == cudaSuccess && cudaGetDeviceProperties(&prop, dev) == cudaSuccess) + return strata::kernels::gfx_arch_is_gfx1151(prop.gcnArchName); + cudaGetLastError(); +#endif + return false; }(); return on; }