Skip to content

pcie: the measured PCIe share default (PcieAuto) on gfx1100 too — gate-measured on a native pack - #2224

Closed
xyzzing wants to merge 1 commit into
Niko1221:mainfrom
xyzzing:pcie-auto-hip-gfx1100
Closed

xyzzing wants to merge 1 commit into
Niko1221:mainfrom
xyzzing:pcie-auto-hip-gfx1100

Conversation

@xyzzing

@xyzzing xyzzing commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

0.1.43 made PcieAuto the default under the gfx12 decode defaults on HIP (decode_defaults_arch_ok → gfx1200/gfx1201, measured on 2×R9700) and for the canonical pack on CUDA (ab97f17). Every other AMD part keeps its earlier behaviour.

This extends the default to gfx1100 (RX 7900 XT/XTX/GRE) — the one other arch where the in-run refinement has been gate-measured, on a native (IQ) pack:

No-regression gate (4 alternating engine starts @64k, same args/env, paired medians): prefill 2189 (base) vs 2180 (with the arm), decode 65.4 vs 65.4 — inside noise. The gate's rule was no-regression, so the arm stays.

Engagement (under --serve, real ~95K-token request): the in-run refinement fires and prints pool 42-45 us/missed expert (45-48 GB/s of expert bytes), the link 28.4-28.5 GB/s -> pcie_frac 0.25 (was 0.55), self-limited to 3 updates — the engine's own f = L/(L + 1.85 r). It has run as our daily-driver production config since 2026-10-12 and was re-verified after the 0.1.43.1 refresh.

Scope, deliberately narrow:

  • gfx1100 only — pcie_auto_fork_arch_ok() pins the arch string exactly. gfx1200/1201 keep 0.1.43's default; every other AMD part keeps the gate's earlier behaviour. Nothing is claimed for unmeasured archs.
  • Native packs only — the canonical pack keeps its CUDA-only refinement, including the Windows opt-in (STRATA_PCIE_AUTO_CANON).
  • Opt-outs unchanged: STRATA_PCIE_FRAC_DEFAULT=old, --pcie-frac N, the layer-split rules (incl. the STRATA_PCIE_AUTO_SPLIT opt-in).

Build: HIP gfx1100, 373/373 targets on the nightly ROCm 10.2 toolchain. The arm is host-side policy (no kernel change); the CUDA path is untouched — pcie_auto_fork_arch_ok() returns false there and decode_defaults_arch_ok() is always true.

…port of the XeStrata stabilization cluster's finding

Upstream aa7b0cb gates PcieAuto to CUDA single-GPU (#if !defined(STRATA_USE_HIP)); the
machinery itself is engine-generic (pool ms per missed expert + miss counts vs the probed
link rate), and this build's start-up H2D probe is already best-of-4 with a +-0.7% spread,
so the HIP exclusion was unmeasured-only, the same class as the ROUTE_TAIL_SKIP gate.
Same opt-outs as CUDA: layer splits excluded, STRATA_PCIE_FRAC_DEFAULT=old restores the
fixed start-up rule. Provenance: MistVVK/XeStrata commits 0530909/055cf9b0/c71cac34/
5952e8e (their measurement-stabilization cluster) demonstrated the failure mode and the
fix class; their exact subsystem is not portable (it is their own engine code).

(cherry picked from commit acb3deb0522a8fc351a4047d2bd11b8ab7a73dca)
@jase100k

Copy link
Copy Markdown
Contributor

Gate run on 2x RX 7900 GRE (gfx1100, ROCm 10.2, NixOS) — the arm is neutral here, and the in-run refinement never fires with this configuration.

Build. The v0.1.43 line (cb30dbab + this PR's patch on top, HIP gfx1100, -DSTRATA_PREFILL_MMQ=ON). A re-run on 0.1.43.1 is in progress and I will add it.

Model and config. Swift 1.5 IQ3_XXS (native pack), 131072 context, --layer-split 27 over the two cards, --spec 4 --spec-min-p 0.5 --mtp rt --kv int8 --pipeline-windows 2, the install's usual environment (STRATA_PF_FUSED=1, STRATA_ROUTE_RESIDENT=1, STRATA_ADAPT_LAG=2, STRATA_SPLIT_MTP_BATCH=1, …) plus STRATA_PCIE_AUTO_SPLIT=1 in the arm.

Method. tools/hip/bench_prefill.py against an otherwise idle server, one warm-up then 4 matched pairs (fresh 4210 / 8830 tokens, follow-up 4451 / 9071), 128 generated tokens, temperature 0, seed 42, each arm a fresh engine start. Medians of the 4 pairs, tok/s:

arm fresh decode follow-up decode fresh prefill follow-up prefill
baseline (same build, arm off) 84.5 72.4 437.6 105.8
this PR's arm 84.0 73.7 427.5 97.3
delta -0.7 % +1.7 % -2.3 % -8.0 %

The spread inside one arm (74.7-91.8 on the fresh pairs) is wider than the difference between arms, so by the PR's gate rule (no regression) the arm stays on this card too.

The refinement does not engage here. Every session printed only the start-up probe:

strata generate: PCIe probe: 28.0 GB/s host->device (best of 28.0 26.6 27.9 27.0) -> pcie_frac 0.55 (default 0.55)
strata generate: layer split: CUDA1 PCIe probe 3.1 GB/s (best of 3.1 3.1 3.1 3.1) -> pcie_frac 0.08

No pool … us/missed expert … -> pcie_frac … line appeared in any session, at 4.2K, 8.8K, 42K and 46K token prompts. The reason is in the same log: with 2x16 GiB and this layer split the engine keeps 95-98 % of the routed experts in the GPU cache, so only 1-4 % of the routed experts are read over PCIe:

strata serve: decode expert cache hit rate: 97.7% (176613 hits / 180846 lookups); 1794 more read by the GPU over PCIe or from another GPU (1.0% of all 182640 routed)

With 1-4 % misses on a 28 GB/s link there is nothing for the pool measurement to re-share, so on this machine the PR changes the default without changing anything measurable — in the direction the PR claims (no regression), on the arch it claims.

Not tested: no correctness/KL check in these arms (the PR's KL evidence is on the XTX); no canonical pack; no Windows; no CUDA; no single-GPU; no 262K context; arms are 8 requests each plus the daily-driver session quoted above.

Full report with per-trial numbers and the log excerpt: bench/results/2026-10-13-pr2224-pcie-auto-gfx1100/README.md.

Niko1221 added a commit that referenced this pull request Oct 17, 2026
…TA_PCIE_FRAC_DEFAULT=auto), not a gfx1100 default: the author's gate was no-regression only and a second gfx1100 report saw it never engage
@Niko1221

Copy link
Copy Markdown
Owner

Thanks. We ported it with your authorship but as an opt-in: STRATA_PCIE_FRAC_DEFAULT=auto turns the refinement on for a HIP card outside gfx12, the default is unchanged. Your gate was a no-regression one and the GRE report shows it does nothing when 95% of the experts are cached, with small negatives on follow-up prefill, so we did not want to change a default on a card we cannot measure. With a gain measured on a card with real PCIe traffic (16 GB-eq, lots of misses) we would revisit.

@xyzzing

xyzzing commented Oct 18, 2026

Copy link
Copy Markdown
Contributor Author

The 7900 XTX fork keeps the measured default-on form: under serve the refinement moves pcie_frac 0.55 -> 0.25 and the PCIe share of routed reads from 8-13% to 3.9%, self-limiting at 3 updates; 0.1.45 composes it with your opt-in STRATA_PCIE_FRAC_DEFAULT=auto for other HIP parts. The fork's gfx1100 default-on is carried as a disclosed divergence across 0.1.43.1/0.1.44.1/0.1.45. No further ask from us - closing our PR.

@xyzzing xyzzing closed this Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants