Repository navigation
Conversation
… reorder (Niko1221#665, Niko1221#1352) Niko1221#665 made --peer-device suppress the automatic layer split; the native multi-helper args --expert-cache-device1..3 were left out, so a multi-GPU helper-cache config got "--layer-split auto" injected AND the Niko1221#1352 speed reorder applied on top. On a mixed-family board (RX 9060 XT primary + 2x RX 6600 expert-cache helpers) that silently demotes the fastest card to the LAST split stage: the first request then staged a split across families which hard-crashed that host twice (GPU reset, no recovery). Helper mode must never be silently converted into a split. helper_cache_of() covers every helper arg and check_placement() rejects helper placement beside an explicit "layer_split" and a --peer-device outside the visible set, at config check; they live in server_parts/engines.py beside layer_split_of. ordered_gpus() keeps the config order when helpers are in play and the startup announce names helper caches instead of the peer tier. Plain split and peer configs render exactly as before. terminal/serve/test_placement_helpers.py: 11 cases incl. the no-reorder regression. On unpatched main the suite fails 4+7 against these cases; the full terminal/ discovery (1947 tests incl. these) shows one pre-existing failure (test_telemetry_adl Windows ADL reader choice, identical on unpatched main) and nothing else. ---
Repro config + build provenance (text form — API asset upload is not available to outside contributors)With the config below (paths replaced by placeholders, nothing else changed), pristine {
"backend": "hip",
"gpu": [0, 1, 2],
"gpus_asked": [0, 1, 2],
"port": 18018,
"host": "0.0.0.0",
"exe": "<dual-arch strata 0.1.62 built from this tree's engine/ dir>",
"cwd": "<repo>/terminal",
"lib_dirs": [
"<venv site-packages>/_rocm_sdk_hybrid_all/lib",
"<venv site-packages>/_rocm_sdk_devel/lib"
],
"args": [
"--pack", "<packs>/iq3_xxs",
"--native", "<models>/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00001-of-00002.gguf",
"--ple-gguf", "<models>/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00002-of-00002.gguf",
"--expert-profile", "<data>/expert-profile.bin",
"--expert-cache", "auto",
"--prefill", "auto",
"--spec", "4",
"--spec-min-p", "0.5",
"--mtp", "<mtp>/rt",
"--max-context", "262144",
"--kv", "int8",
"--kv-resident", "32768",
"--expert-cache-device1", "auto",
"--expert-cache-device2", "auto"
]
}Engine build behind the production-validation row (reproducible): The first |
|
Superseded by #7434: the same patch rebased onto the v0.2.23 release tag (this branch predates the terminal/serve/ restructure and had drifted). Fresh proof pair recorded on v0.2.23 itself: pristine tag -> 4 failures + 7 errors in the placement suite; patched branch -> 11 OK, and layer_split_of on the expert-cache repro still returns True on v0.2.23, so the gap is still live upstream. |
Problem and result
A multi-helper config —
gpu: [0, 1, 2]with--expert-cache-device1 auto --expert-cache-device2 auto(RX 9060 XT primary + two RX 6600 expert-cache tiers; gfx1200 + gfx1032 mixed) — is placement, but
serve did not know it. #665 made
--peer-devicesuppress the automatic--layer-split autoinjection;the expert-cache helper args never got the same treatment, and serve also applied the #1352 speed
reorder on top. Before:
--layer-split autowas injected anyway and the GPU order rewritten so thefastest card (the gfx1200 primary) landed in the LAST split stage. On this board the first such request
hard-crashed the host twice (GPU reset, power-cycle needed). After: helper placement is honored end to
end — no injection, no reorder, correct announce line — and
check_placement()fails at config-checkon contradictory placement (helper args beside an explicit
layer_split,--peer-deviceoutside thevisible set). Split-only and peer-only configs render byte-identical to before.
Related discussion
#665 — the peer-vs-split gate this extends to the native multi-helper args; #1352/#1576 — the reorder
that misfires here (it assumes split semantics; helper configs are not splits). Bugfix, no behavior
change for non-helper configs, so no prior scope agreement sought.
Approach
One gate shared by both injection points, in #665's style:
helper_cache_of()recognizes every helperarg (
--peer-device,--expert-cache-device1..3);layer_split_of()andordered_gpus()consult it;check_placement()turns silent misplacement into a config-check error. serve never setsSTRATA_PRIMARY_DEVICE, so visible order IS placement — the reorder actively breaks it. No engine-sidechanges. The board this was validated on mixes gfx1200 and gfx1032; a docs-only note about wheel /
lib_dirs ordering on such mixed boards may follow separately.
Validation
Environment for everything below: one mixed-family production server — Xeon E5-2697 v3, 64 GiB RAM,
RX 9060 XT (gfx1200, x16 Gen5) + 2x RX 6600 (gfx1032); Python 3.12 venv, TheRock 7.13.0a20260515
wheels (core + devel + gfx103X_all), no system ROCm. Engines 0.1.60 and 0.1.62 built from this tree with
-DCMAKE_HIP_ARCHITECTURES="gfx1032;gfx1200", native MMQ (build flags + binary sha attached). Model:Qwen3.8-Flash-Next IQ3_XXS, 262144 ctx, KV int8 / resident 32768, MTP.
Passed:
mainlayout itself(branch rebased at
58ee32277, engine built from this tree'sengine/dir — 0.1.62,gfx1032;gfx1200): launched engine cmdline shows--expert-cache-device1 auto --expert-cache-device2 autoand no--layer-splitdespite both helper cards;full ladder 4k → 211,427-token markers (all 3/3) + 30-min soak passed, CE 0, VmSwap 0.
terminal/serve/test_placement_helpers.py(new, 11 cases) against pristine currentmain:Ran 11 tests ... FAILED (failures=4, errors=7)— this is the reproduction; same suite on thebranch:
OK.cd terminal && python -m unittest discover -s . -p "test_*.py"):Ran 1947 tests— the only failure isserve.test_telemetry_adl.OnlyTheMonitor.test_reader_choice(a Windows ADL reader-choice test under Linux), identical on unpatched
mainon this host;88 skips are platform-conditional. Everything else passes, including
test_split,test_split_fallbackandtest_server.90k 57.9 s; marker requests at 120,875 / 151,059 / 181,243 / 211,427 prompt-tokens all answered
finish=stopin 89.1 / 102.9 / 131.3 / 150.0 s — 20-25 % faster than the 0.1.59 engine runningweeks at the same settings (112.5 / 140.2 / 164.4 / 184.5 s); CE delta 0 and major-fault delta 0 at
every stage; effective engine args captured from
/proccontain no--layer-split.soak requests, zero exceptions, zero guard trips, decode expert-cache hit 90.0 %, KV streaming
99.5 % VRAM. (Soak flags with exec-test failures were classified by direct reply inspection as a
model-side artifact — the model sometimes returns the prompt's code skeleton — identical rate on
the unpatched engine.)
Failed: none observed on the branch. (The pristine 4 failures + 7 errors are the expected
reproduction, listed above.)
Not run: CUDA / SYCL / Metal / Windows — no such hardware here; the serve gate is backend-agnostic
but only HIP paths were exercised. Subprocess integration test for placement — the new cases are
unit-level against serve's arg rendering. Engine CI matrix — this PR touches no engine build files.
Limits
Single host, single model family. Staged layer-split across gfx1200+gfx1032 stays dangerous on this
board — this change makes serve stop silently creating it; it does not make the split itself safe.
check_placement()rejects helper+explicit-split rather than reconciling it — stricter than a merge,chosen because the merge already proved fatal here.