BW-G's row_prefetch.hpp (STRATA_ROW_PF) chose the locality with a conditional; __builtin_prefetch needs a constant integer. One call per case, the same three localities. x86 is unchanged (it takes the _mm_prefetch branch).
BW-G measured it bit-exact (BASE-05 27 of 27, pool_determinism --reps 20, 124,656 checks) with the CPU pool's window -2.9% on an RTX 5090 + EPYC box.
ExpertPool's constructor reads the variable once: unset or anything but "0" is on. Not under the NUMA split and not for Q2_0 down rows, as before.
A second ctest, pool_determinism_dep_off, runs pool_determinism with STRATA_POOL_DEP=0 so the way back stays covered.
From PR #4854 (Keoian; its commits 43e390e0e and 7a68664ac), author kept. On a CPU with AVX and no AVX2 (the older-CPU
source build, STRATA_ISA_FLOOR=avx) q2_native_kernels() admitted AVX2 only, so every native pack's Q2_0 expert ran on
ggml-cpu's own vec_dot and never reached the AVX1 rows of q2_avx1.cpp. It now also admits cpu_avx1_ok(); a CPU
without AVX keeps ggml-cpu. On a CPU with AVX2 nothing changes (the first term is true as before). The AVX1 bit-plane
row (STRATA_Q2_BITPLANE=1) computes a pair's float part in one 256-bit register, block 0 in the low lanes and block 1
in the high ones, each lane with the operations of the 128-bit form, so its bytes do not change; h2f_scale converts a
normal fp16 block scale in four integer operations (h2f's normal branch, bit for bit; zero, subnormals, inf and NaN
still take h2f). Author's numbers (i7-3770): a one-token Q2_0 expert 0.975 ms on ggml-cpu, 0.487 ms on the AVX1 rows,
0.297 ms with the bit-plane form; decode on 2x RX 5700 XT 14.97 to 22.38 tok/s. Not measured by us (no AVX-only CPU);
q2_bitplane_parity (AVX1 form against its 128-bit legacy form) with STRATA_Q2_BITPLANE=1 is in the gate table.
From PR #5481 (nekorobi-0; its commit 0946bbd77), author kept. On a CPU with AVX-512 VNNI and
no VBMI (Cascade Lake) the SYCL engine's start-up line said "this CPU has no AVX-512: the expert kernels run on AVX-2",
even with STRATA_VNNI_TIER=1 on. The line now says which case it is: no AVX512-VNNI at all; the VNNI tier off or not
available; or (with the tier on and no VBMI) "AVX-512 VNNI tier enabled (no VBMI)". The cpu_vnni_ok() header comment
names the DQ requirement and the switch, and docs/DETAILS.md gains the STRATA_VNNI_TIER row (off by default: those
rows round differently from the AVX-2 rows). Log text and docs only; no computation changes. The two new lines are in
the results file's text list.
The two row phases of run_split_multi_native (gate/up, then down) end in a barrier: every worker waits for the slowest task of the phase, and the host quantizes the intermediate between them. With STRATA_POOL_DEP=1 the layer call is one batch (mode 7): the experts' gate/up row ranges first (expert-major), then the experts' down row ranges. A down task waits only for its own expert's gate/up tasks (a counter), and the first thread that gets there quantizes that expert's intermediate once. Every gate/up task has a lower index than every down task and waits for nothing, so a waiting down task always waits for a running task. The rows are computed by the same kernels from the same bytes: the outputs are the two-phase batch's bits (bwg_pool_bench hashes equal for Q4_K/Q5_1 and Q4_K/Q8_0 experts, 1-3 tokens, tasks 0 / 41 / 132, 1 and 3 workers). Not used under the NUMA split or for Q2_0 down rows.
The Q4_K / Q5_1 / Q8_0 row loops of native_gu_rows / native_down_rows can request the next rows of the expert while the current row is computed (row_prefetch.hpp; t0 / t1 / nta hint, a prologue for the first rows). It reads and writes nothing: the results are the same bits. On a 22-worker pool over a cold 6 GB arena it moves the layer call by at most 2.5% (0.389 to 0.379 ms), so it stays off.
Adds bwg_pool_bench: the pool's own run_split_multi_native on UD-shaped synthetic experts (Q4_K gate/up, Q5_1 / Q8_0 down), cold or hot arena, optional MADV_HUGEPAGE, a hash of the outputs.
native_qsa_indexer_append_batch threw one text, "bad geometry, positions, parameters or scaling", for seven different causes (no stream, a wrong
geometry, a negative position, positions past the session's cells, a cell count or base past 2^31, a bad epsilon, a bad RoPE scaling). Three engine
exits on 0.1.58 could not be told apart, and nothing in the log said whether a prefix reuse had handed the append a position past the session.
The check moved into strata/kernels/qsa_batch_check.hpp (pure, no GPU): the text now starts as before and ends with the first failed predicate and
its values (p0, n and the session's cells, the block, the epsilon, the RoPE problem). The conditions are the same as before, so no request that
passed fails and none that failed passes.
Test: qsa_batch_check_test (every predicate, the position case with p0 / n / cells in the text, the old text kept at the start).
The Q4_K gate/up rows had no 512-bit tier in the default build (the quant layer's Avx2 contract, one token at a time), and the Q5_1 / Q8_0 down rows had a
256-bit VNNI tier per token. kq_avx512.cpp runs the integer part of every block on vpdpbusd (Q4_K: 64-byte vectors, the 6-bit scales through vpdpwssd) with the
weights decoded once per row for every token of a group, and keeps the AVX2 contract's float chain (the eight-lane accumulator, the mins term, the hsum) so each token's
row is the one-token dot's bit for bit. Dispatch only on a CPU with AVX-512 F/BW/VL/DQ/VNNI/VBMI (cpu_avx512_ok); the old rows stay the fallback; kq512_ok checks the
rows against the build's own dot on first use and sends a mismatch back to it; STRATA_NO_KQ512=1 never takes them, STRATA_KQ512_MIN=N moves the token floor (gate/up 3, down 2).
kq512_parity (840 cases: 1 to 160 tokens, real and raw-byte activations, row ranges, the SwiGLU of the gate/up rows) is bit-equal on a Xeon 8352V and skips (77) without
AVX-512. One thread, 256 rows, Xeon 8352V: Q4_K n=2560 8 tokens 113 us against 182 us for the dot per token and 125 us for the AVX2 multi-token rows, 64 tokens 767 / 1474 / 1054;
Q5_1 n=640 8 tokens 44 / 122 / 78; Q8_0 40 / 67 / 48; one token is slower than the dot (Q4_K 68 against 38 us), hence the floors.
Accumulates, per pool, the time of run_split_multi_native split into the wait for the workers to park before each
phase, the phase from publish to the last task done, the wait for the workers to park after it, the host's
activation quantization between the two phases, and per worker the time inside the row tasks and the time from
publish to leaving the park. One line every 2,000 calls and one when the pool ends. Diagnostic only; off without
the variable. Re-applied from 24d6ab38f (f-diag-pool) onto the 0.2.16 layout.
A kernel on the shared expert's low-priority side stream issues prefetch hints (cp.async.bulk.prefetch.L2 on
sm_90+, prefetch.global.L2 below) over the next layer's GGUF-form projections, hyper-connection and router
weights and the shared expert's, from the point the wait for the CPU rows starts, and joins through the shared
expert's event. The hints read and write nothing, so the window's values are the same bits. Default off;
STRATA_L2_PF_MIB=n keeps the first n MiB of a layer (in the order the layer reads them), STRATA_L2_PF_BLOCKS
sets the grid. Only the doorbell graph with CPU experts (not all-resident, not a split or batch window,
not the stage profiler). CUDA only (a no-op kernel on HIP is not launched). WeightRef gets native_bytes.
Made by tools/layout/move_0216.py (the commit before this one) on db8e0be9c, the final code head of 0.2.16:
- 75 git mv (renames, so `git log --follow` and blame keep working; packaging/acceptance_matrix.md shows as delete + add because its links
changed too) and 3 removals: SETUP.bat, UPDATE.bat and update.sh (setup.py --update pulls the code now);
- 1,425 path edits in 307 files: root-relative paths in CI, Docker, .gitignore and the release scripts; Markdown links; Python and
Node joins from a root that moved with its folder; explicit edits for code that computes a root or names a moved path; tables of
repository paths inside tests.
engine/ holds what CMake builds (src, include, cmake, metal, sycl, spark, third_party, the C++ tests and benches). app/ is the desktop
app and its host (was apps/). terminal/ is the Terminal in the layout of the installed one (strata.py, setup.py, strata_cli,
strata_control, serve, bin, data, ref, crates, the Python tools and tests). docs/ has the documentation, docs/lang/ the translated
READMEs, docs/history and docs/bench-results. tools/ has the repository's own checks, packaging, docker, research and nix.
tests/core/test_tqp_ref.py is a pytest file and stays with the Python tests (terminal/tests/core/).
AGENTS.md, README.md, LICENSE, setup.sh and START-HERE.bat stay at the root.
No behaviour change: the same command lines, the same sources. For this head a replay of the script gave the same numbers and the path
scan (tools/layout/checks/path_scan.py) reports no hit; the suites and the builds run on this commit next.