f-bw-h (a620ffb61, 595d40922) and f-bw-f (38e6a0506) both arm the CPU prefill
share on a layer split. One conflict, engine/src/program/generate.cpp, the
share arming block of the serve start-up, resolved to one rule:
- BW-H first: on a layer split the stages' stream floors are summed; where the
link rule raises the limit above 3,072 (Prefill::arm_cpu_share_split) it arms
the share by itself and sets the limit and the expert width. This is what arms
a split of three or more cards, and it gives a two-card split with a slow link
its larger limit.
- BW-F second: arm_cpu_share(share_pool, share_pool && share_layout &&
share_has_work): one card, or exactly two CUDA cards (STRATA_SPLIT_CPU_SHARE=0,
kSplitShareDefault), armed by default with the default limit. A two-card split
of fast links therefore keeps the share armed, as BW-F measured it.
- set_card_expert_share takes pool.workers() (BW-H) in the one-card condition.
- BW-F's start-up line is kept.
docs/SETTINGS.md is generated (conflict only in its table): regenerated from the
register.
The default share took chunks up to 3,072 tokens and experts of at most 8 tokens, a setting measured on one 28 GB/s link. A chunk from the limit up streams every expert the card does not hold in
one pass whose time F (bytes of the missing experts / the link) does not depend on the chunk length; the staged walk with the share grows with it, so the share pays up to a length T* that
grows with F. RTX 5090 cards, UD-Q4_K_XL (8,056 of 24,576 experts on the card), 3 interleaved rounds, the share with 32-token experts against the default: T* 4.2K tokens at 53.6 GB/s (15 pool
workers), 8.8K at 28.3 GB/s (22), 14.0K at 14.1 GB/s (32), 19.7K (32-token experts) / 25K (64-token experts) at 3.6 GB/s; 8 pool workers 7.7K, 16 workers 8.5K (22: 8.8K). At 53.6 GB/s the
default 3,072 beats streaming by 25-34% from 1,536 tokens and above ~4K staged equals streamed, so the rule never goes below 3,072.
share_rules.hpp link_rule(): limit = 3.4 x F (ms) tokens up to F = 3.67 s, +0.76 tokens per ms of F above it, between 3,072 and 20,480, scaled by (workers / 22)^0.15 for smaller pools; experts of
up to 32 tokens (64 from F = 3 s) where the limit is raised. Prefill::set_card_expert_share takes the pool's workers; arm_cpu_share applies the rule to the default-armed share only (an explicit
STRATA_PREFILL_CPU_SHARE, STRATA_PREFILL_CPU_SHARE_MAX and STRATA_PREFILL_CPU_SHARE_NT keep their meaning) and prints one "CPU share rule:" line. STRATA_PREFILL_CPU_SHARE_AUTO: unset = cc 12.0
discrete cards with the link probed, 1 = any CUDA card, any other value = off. Settings register, docs, unit tests (share_rules_test) updated.
Until now the default CPU prefill share (idle pool takes some of the experts a prompt chunk would stream over PCIe, chunks up to 3,072 tokens) was armed on one card only.
A layer split streamed every expert of every short prompt over PCIe, stage after stage, so a prompt of 32 to 566 tokens took 1.4 to 1.8 times as long on two
RTX 5060 Ti 16 GB as on one (UD-Q4_K_XL, DFlash2, PCIe 4.0 x8, 48 cores). The stages already take the pool one at a time (prefill.cpp), and
STRATA_PREFILL_CPU_SHARE=auto works on a split; only the default was missing.
share_rules.hpp: default_share_layout(later_stages, multi_gpu, env, cuda): one card as before; one later stage (two cards) on a CUDA build by default, the
switch both ways; three and four cards, the helper caches and HIP / SYCL builds stay off. generate.cpp (serve): the H11 memory check and arm_cpu_share use it,
one start-up line says so. share_rules_test: the layout table.
Prompt ms, two cards, default share off against on (3 rounds, tail skip off): 32 tokens 605 -> 268, 64: 825 -> 384, 84: 1,193 -> 489, 169: 1,680 -> 669,
566: 3,188 -> 1,574, 1,024: 2,869 -> 1,754, 2,048: 4,547 -> 2,512; 4,096 and longer are above the limit (+2%). Details and the KL gate: phaseA-tests/bw/RESULTS-BW-F.md.
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.