mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #854] [CLOSED] expert plan: a helper GPU's experts are not part of the PCIe share (--remote-expert-opt decode 40 -> 66 tok/s on 2x RX 6900 XT) #2874
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#2874
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/854
Author: @Vop3p
Created: 10/4/2026
Status: ❌ Closed
Base:
main← Head:remote-opt-pcie-share📝 Commits (2)
ffca1b0expert plan: a helper GPU's experts are not part of the PCIe share40f4a5bbench, docs: the helper GPU's experts and the PCIe share on 2x RX 6900 XT; SECOND_GPU.md states the HIP measurement📊 Changes
5 files changed (+123 additions, -3 deletions)
View changed files
➕
bench/results/2026-10-04-rdna2-helper-pcie-share/README.md(+55 -0)➕
bench/results/2026-10-04-rdna2-helper-pcie-share/strata-helper.json(+46 -0)📝
docs/SECOND_GPU.md(+8 -2)📝
include/strata/core/remote_experts.hpp(+2 -0)📝
src/core/expert_source.cpp(+12 -1)📄 Description
The bug
The verify window's GPU plan (
expert_source.cpp) counts the layer's misses and moves the lastpcie_num/256of them tothe primary over PCIe. The count and the pick leave out experts resident on the primary and those of the peer tier
(
--peer-device), but not those a helper GPU (RemoteExperts,--expert-cache-deviceN) holds: the plan runs beforeRemoteExperts::begin()claims its rows, andbegin()only takes rows the plan left at kind -1. So with a PCIe shareabove 0, part of the helper's experts is read over the primary's link and computed there, while the helper sits idle for
them.
setup recommends
--remote-expert-optfor 2+ GPUs (#578), and the PCIe share is probed per link (0.39 on PCIe 4.0 x8 here),so this hits the recommended two-card configuration.
The fix
RemoteExperts::holds(layer, expert)(the helper cache'sslot_of, asRemoteExpertOpt::ownsalready reads it), and theplan treats such an expert as it treats the peer tier's: not a miss, never in the PCIe share. Its rows stay at kind -1
for
begin(). The PCIe share now only takes experts no GPU holds, i.e. ones the CPU would otherwise compute. No defaultchanges; without helpers nothing changes.
Measurements
2x RX 6900 XT (PCIe 4.0 x8 each, probe 14.1 GB/s -> pcie_frac 0.39), ROCm 10.0, Qwen3.8-Flash-Next GSQ-RCO IQ3_S,
--expert-cache auto --expert-cache-device1 auto --remote-expert-opt,--spec 4, two ~5K-token prompts with ~450-tokenanswers,
STRATA_DECODE_TIMING=1:--pcie-frac 0With the fix the probed share costs nothing against 0 and takes a little off the CPU. Until then,
--pcie-frac 0is theworkaround (main with it: 34.1-34.6 ms per window, 60.5 / 67.7 tok/s).
Not tested
CUDA (no CUDA here; the change is backend-independent host code). Three or four helper GPUs (
remote_count> 1 iscovered by the same loop). The prompt path is not affected (it does not use this plan).
Validation and docs
-DSTRATA_BUILD_TESTS=ON, the same options as the engine build, gfx1030, ROCm 10.0): 60 of 65 pass, the same 60 as6f32ec0without this change. Skipped:hip_prompt_attn_wmma(no matrix cores on gfx1030),hip_prefill_hipblaslt_gemm(no hipBLASLt table). Failed for reasons outside the engine, identically with and without the change:ple_parity(a Q2_0 PLE file that is not on this machine),expert_multi_test(this Zen 3 CPU has no AVX-512),platform_memory_test(mlockat the shell's defaultulimit -l).6f32ec0+ #835 (the binary this machine had; #835 touches only the prompt path). Rerun on6f32ec0unchanged, same method: 60.4 / 57.8 ms per window, GPU-reach wait 43.7 / 43.0, PCIe entries 4.07 / 3.91 per layer-window, 41.0 / 37.5 tok/s - the same as the table's baseline. The fix rerun the same day: 35.2 / 33.8 ms, PCIe 0.20 / 0.06, 63.0 / 64.4 tok/s.docs/SECOND_GPU.md's helper section no longer says HIP is unmeasured: it states the two-card HIP measurement, the cost of the share before this change and the--pcie-frac 0workaround; details and the configuration inbench/results/2026-10-04-rdna2-helper-pcie-share/README.md.Developed with an AI coding assistant; every number above was measured on 2x RX 6900 XT (gfx1030, PCIe 4.0 x8 each) / Ryzen 5 5600X, ROCm 10.0.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.