Files
Niko1221 5bafbe3bcd engine(cpu): the 4-row dot kernels are the default from two tokens per expert call, off for one token (#7075, #6552)
0.2.21 made the dot_x4 kernels of the native CPU expert path opt-in
(STRATA_DOT_X4=1) because a single-thread cold bench showed them slower on a
DRAM-bound row.  #7075 measured the other side (2x RTX 5090, PCIe-streamed
NVFP4, 4 slots): without them warm batched decode lost ~15% and short prompt
reads ~8% against 0.1.66, and STRATA_DOT_X4=1 recovered both, while solo
decode (one token per expert) was better with them off.

The default now follows the call, as the reporter suggested and the reply on
the issue promised: on from kDotX4MinTokens = 2 tokens that share the expert in
one call, off for one token.  STRATA_DOT_X4=1 forces them on for every call,
STRATA_DOT_X4=0 off for every call (exactly the 0.2.21 / 0.2.22 default),
STRATA_NO_DOT_X4 (any value) still wins.  The two forms give the same bits:
dot_x4_test, and cpu_dispatch_dump hashes of every nt 1..8, whole and off-vector
row ranges, both arithmetics, identical for off / default / on / NO_DOT_X4
(zz_x4_proof.sh); pool_determinism passes in all three modes.

dot_x4_policy.hpp: dot_x4_mode() (read once) and dot_x4_enabled(mode, nt);
dot_x4_policy_test covers every case.
2026-11-26 23:04:57 +01:00
..