Skip to content

Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.

C++

Fix #3358: the ISA guard knows the trellis AVX-512 rows (tq_avx512.cpp), so isa_guard_check passes on a normal build

Niko1221f9e1fff9830d
diff --git a/tools/check_isa_guard.py b/tools/check_isa_guard.py
index 9e7a8e450..83cd18f1b 100644
--- a/tools/check_isa_guard.py
+++ b/tools/check_isa_guard.py
@@ -37,8 +37,9 @@ WIDE_PUBLIC = {
"iq256_rows_v", "iq4nl256_down_rows", "iq4nl256_down_rows_v", "q2_0_gguf_rows_multi_avx2",
"q2_0_gguf_rows_multi_avx2_v", "q2_0_gguf_rows_multi_avx2_legacy", "q2_0_gguf_rows_multi_avx2_bitplane",
"act_quant_q8_1_avx2", "q8k_quant_avx2", "kq256_gu_rows", "kq256_rows", "bf16_rows_dot_multi",
+ "tq_rows_avx512", # trellis rows (tq_cpu.cpp: behind cpu_avx512_ok())
}
-WIDE_OBJECTS = ("expert.cpp", "iq_avx512.cpp", "iq_avx2.cpp", "q2_avx2.cpp", "kq_avx2.cpp", "nvfp4_avx512.cpp")
+WIDE_OBJECTS = ("expert.cpp", "iq_avx512.cpp", "iq_avx2.cpp", "q2_avx2.cpp", "kq_avx2.cpp", "nvfp4_avx512.cpp", "tq_avx512.cpp")
# Also compiled above the baseline (AVX2/FMA for nvfp4_avx2, AVX for the older CPUs' rows) and reached only behind a CPU
# check. STATIC INITIALISERS in any of these run on EVERY CPU at program start (#2324: nvfp4_avx2.cpp / nvfp4_avx512.cpp
# built a table in a constructor, the compiler used AVX/FMA for it, and a Westmere / Sandy Bridge Xeon died with an
diff --git a/tools/test_check_isa_guard.py b/tools/test_check_isa_guard.py
index c92810d43..dd192303b 100644
--- a/tools/test_check_isa_guard.py
+++ b/tools/test_check_isa_guard.py
@@ -34,6 +34,12 @@ class Policy(unittest.TestCase):
self.assertIsNone(G.judge("strata::kernels::cpu::(anonymous namespace)::gu_rows<18, 1>(int)", None, "", False,
False, True))
+ def test_trellis_rows_entry_point_is_fine(self):
+ """#3358: tq_avx512.cpp's rows function is behind cpu_avx512_ok() like the other wide kernels."""
+ name = "strata::kernels::cpu::tq_detail::tq_rows_avx512(int, unsigned char const*, unsigned long, int)"
+ self.assertIsNone(G.judge(name, "tq_avx512.cpp.o", "", False, False, True))
+ self.assertIsNotNone(G.judge(name, "tq_cpu.cpp.o", "", False, False, True)) # the same code elsewhere is not
+
def test_listed_public_entry_point_is_fine(self):
self.assertIsNone(G.judge("?act_quant_q8_1@cpu@kernels@strata@@YAXPEBMHAEAUActQ@123@@Z",
"strata_kernels_cpu:expert.cpp.obj", "", False, False, False))