Issues / #2507
#2507 Per-slot expert budget and PCIe-idle prefetch: live per-device telemetry for a 2-GPU layer split
open · @shahrokhzargarpour · 0 comments · View on GitHub
BenchmarksSetup & installMulti-GPUAMD / HIPNVIDIA / CUDADocumentationWindows
Description
## Problem There is no per-slot expert budget and no eviction policy driven by live per-device telemetry: - `ExpertCache::admit` never evicts - the policy is declared absent in `include/strata/core/expert_cache.hpp`. That specific piece is being pursued in #1923 (with the harness from #1089), so we won't re-open it here. - The adaptive budget is one common pool per GPU, and the split is fixed once at setup by a static heuristic (`docs/BATCHING.md`: "slots may take at most a fifth of it, up to 4 slots"). Nothing recomputes it at runtime, and there is no notion of "which experts does this slot need" - two slots that need the same experts both pay full price. - There is no live per-device telemetry to drive a policy: the PCIe link is probed once at start-up (`docs/MULTI_GPU.md`: "there is no per-card setting yet"), so a 2-GPU layer split with asymmetric links is invisible. #2317 and #2423 add per-card display/metrics, not a policy input. - The topology we run rules out the existing second-GPU tier: `--peer-device` is "Not with --layer-split" (see #665), and `--layer-split` is exactly what we run. ## What we measured Windows, Ryzen 9 9950X, RTX 4080 SUPER (x16) + RTX 3090 (x4 chipset slot), engine 0.1.44.1, `--layer-split auto --batch 4`, expert arena on 2 MiB large pages: - ~40% of the clock with both GPUs idle; the layer hand-off is serial - one GPU at 100% while the other sits at 0%, and neither goes above 60% of its power (see #1120 for the hand-off overlap). - Prefill is CPU-bound, the pool at 817% without overlapping decode. - The PCIe links are asymmetric: the 3090 in the x4 chipset slot does 0.9-1.8 GB/s vs 26.9 GB/s on the x16 (same x16/x4 gap as #2418). - A cold ~150k-token prompt prefills in 190.23 s (901.6 tok/s); after eviction, a reload restored 0 of 171,520 tokens (0.0%). ## How we propose to solve it (three layers) 1. **Live per-device telemetry** - extend the start-up PCIe/VRAM probe to a continuous per-card signal (VRAM free + PCIe free on each card of a layer split), fed back to the policy below. 2. **Per-slot budget + eviction** - replace the static setup heuristic with a per-slot budget proportional to shared vs non-shared experts, and build the eviction on the #1923/#1089 measurement. 3. **A scheduler that uses the pipeline's idle windows** - in a layer split the waiting card has idle PCIe; use those windows to prefetch the experts the policy predicts for the next slots, rotating roles. ## Not proven - No per-slot shared/non-shared split measured, and no prediction accuracy for "which experts the next slot needs" validated. - The PCIe asymmetry is a start-up probe; we have not attributed its end-to-end decode cost. - None of the three layers is built or benchmarked - this is the design, to coordinate before overlapping code lands. - We run on Windows; the maintainer noted there is no Windows test box on their side (#2185/#1412), which is why these numbers aren't reproduced elsewhere. We run these experiments on our fork, which also carries the conversation-cache disk tier (a PR for that is being prepared from our fork).
Related on this site
Quick links to related pages.