mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-04 23:38:47 +00:00
The whole i-quant family (IQ3_XXS, IQ3_S, IQ2_S, IQ4_XS gate/up, IQ4_NL down) and the fork's Q2_0 down have x86 dots only under __AVX2__ in ggml-cpu; on an AVX1 floor (STRATA_ISA_FLOOR=avx, issues #595/#623/#1375: Xeon E5 v1-v2, and AVX-512-only packs) the CPU-computed experts fall to the scalar _generic dots. iq_avx1.cpp is the older CPUs' copy of iq_avx2.cpp in the kq_avx1.cpp pattern: a separate TU compiled -msse4.2 -mavx -mno-avx2 -mno-fma -mno-f16c, gated at runtime behind cpu_avx1_ok() and only when AVX2 is absent, so no mainstream path changes. 128-bit integer lanes (pshufb/sign/maddubs are SSSE3), 256-bit float accumulation, software half-to-float, no gathers (the Fmt32 non-gather path), one IEEE mul per value like the AVX-2 copy. Plus q8k_quant_avx1, the byte-identical Q8_K activation quantizer in SSE4.2/AVX1. iq_avx1_parity: all six formats, nt=1..8, bit-exact across widths (#152) and within 1e-5 aggregate of ggml's generic dots; q8k_quant_parity now checks the AVX1 copy too. gu rows take the AVX-2 mt_min policy (STRATA_IQ_MT_MIN), down rows always; kill switch STRATA_NO_IQ128=1. E5-2470 v2 (Ivy Bridge): 1.2-3.1x per expert at nt>=2, 2.0x on the Q8_K quantizer; serve prefill +36-41%, warm decode 22-25 -> 46 tok/s. Known pre-existing gap found while testing: pool_tasks_test SIGILLs on non-AVX-512 machines even on a clean tree (it predates the ISA floor and is not gated).