Repository navigation
Conversation
…tch, CPUs without AVX-512) df6980d put the software prefetch in iq_avx512.cpp, so it only reaches CPUs with AVX-512; the AVX-2 kernels, which is what a Zen 3 / Haswell / Skylake-client box actually runs the i-quant rows on, had none. Same env, same default, same hint: STRATA_IQ_PREFETCH is the distance in bytes, 0 = off, default 2048. Measured on a Ryzen 7 5700X3D (AVX-2 only, 64 GB DDR4-2666, 4 KB pages - large pages refused) with IQ3_S decode, 4 rounds interleaved, outputs identical: gate/up phase 13.571 -> 13.024 ms/round (-4.0%) rows 25.1 -> 26.1 GB/s (+1.0) whole round 45.54 -> 44.94 ms/round (-1.3%) and with the pool cold (first round after the arena is built) the round is -2.4%. The same 4 rounds with STRATA_IQ_PREFETCH=0 land within 0.1% of the unpatched binary, so the patch itself costs nothing. native_expert_parity: 0 failures with the prefetch on and off. The non-temporal hint was measured worse than T0 at the same distance (-0.7% vs -1.3%, +0.5 vs +1.0 GB/s), so this keeps T0. 4096 is a little worse than 1024/2048, which is why the default stays 2048 as in the AVX-512 file.
|
Thanks, clean and consistent with E-2. It goes into 0.1.29 after the build check; if anyone has an AVX2-only Intel CPU, |
|
Released in 0.1.29: the AVX2 prefetch; output unchanged. Merged under your name (cherry-picked, so GitHub doesn't show it as merged). Thank you! |
|
Independent datapoint from an AVX2-only Intel — i9-7980XE (Skylake-X): it has AVX-512F/BW/CD/DQ/VL I hand-carried the 21 lines onto current main (bbaaabb) and A/B'd from one binary with an |
…iko1221#197), faster prompt kernels (Niko1221#187, Niko1221#188, Niko1221#207), correctness fixes (Niko1221#154); setup requires it
…iko1221#197), faster prompt kernels (Niko1221#187, Niko1221#188, Niko1221#207), correctness fixes (Niko1221#154); setup requires it
…iko1221#197), faster prompt kernels (Niko1221#187, Niko1221#188, Niko1221#207), correctness fixes (Niko1221#154); setup requires it Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0154bwiad8gY7wRehCXy27pN
What
df6980dput the software prefetch intoiq_avx512.cpp, so it only reaches CPUs that have AVX-512. The AVX-2 file - which is what a Zen 3, a Haswell or a Skylake-client box actually runs the i-quant expert rows on, see #103 - had none of it. This adds it there, with the same switch, the same default and the same hint:STRATA_IQ_PREFETCHis the distance in bytes,0= off, default2048. No new knob.Three sites, the three loops that stream rows in that file:
row_dot(the i-quant gate/up rows,Fmt32<TY>::bytesper block)row_dot_iq2xs(the IQ2_XS gate/up rows)iq4nl_rows(the IQ4_NL down rows)21 lines added, nothing removed, no change to what is computed.
Measured
Ryzen 7 5700X3D (AVX-2 only, 8 cores), 64 GB DDR4-2666, RTX 5060 Ti, Windows. IQ3_S, 131072 context,
--pcie-frac 0.30,--spec 4, 300 tokens, the same args for every run.ms/roundis the metric, sincetok/smoves with draft acceptance. Runs interleaved, so the thermal drift hits every variant the same way; the comparison below is within the same round, against the same patched binary withSTRATA_IQ_PREFETCH=0.The unpatched binary and the patched one with the prefetch off land within 0.1% of each other in both rounds, so the patch itself costs nothing.
native_expert_parityon the IQ3_S shard: 0 failures with the prefetch on and with it off.The effect is bigger with a cold pool (-2.4% on the round) than warm (-1.3%), which is what you would expect from a prefetch.
Things I checked and did not send
_MM_HINT_T0like the AVX-512 file.iq_avx512.cpp.Caveat
This is 2 rounds of 6 variants, not the sweep you usually ask for: the sign is the same in both rounds and on all three metrics, and the control is clean, but n is 2. Happy to run more rounds on this machine if you want the number firmed up before merging - it is ~25 min per 12 runs.