[Engine] GEMM warm-up runs before expert-cache sizing on a mixed CUDA layer split: about 225 MiB less per card, 242 fewer cache slots, about 2% decode

Aperta
#7,289 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 4 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cpp

Direzione di ricerca

Start at terminal/serve/server.py and trace where startup runs the GEMM warm-up and sizes the expert cache; inspect the handling of mixed CUDA architectures, including the behavior discussed in #3204. Compare cache slot counts and decode performance with warm-up enabled and disabled on the reported sm_86/sm_120 split. Done when warm-up no longer reduces cache capacity or the reserve accounts for its workspace, and the CUDA architecture rule is clarified.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Area

[Engine]

Desktop app, Terminal or source?

Terminal (strata serve through terminal/serve/server.py)

What happened

On v0.2.22 the engine warms the BF16/FP16 GEMM libraries on GPU 0 at start (about 11 s), before it sizes the expert cache. Free VRAM at sizing is about 225 MiB lower on each card than on v0.2.16 (CUDA0 9.98 to 9.76 GiB, CUDA1 8.47 to 8.24 GiB), so the cache gets 242 fewer slots (5,045 / 3,800 on v0.2.16, 4,922 / 3,681 on v0.2.22). With STRATA_PREFILL_WARM=0 the slots come back (5,042 / 3,797) and decode rises from 74.9 to 76.5 tok/s.

I expected the warm-up not to cost expert-cache slots. Two suggestions: warm after the cache is sized, or count the libraries' workspace in the reserve.

A question as well: #3204's fix skips the warm-up when the cards differ in architecture. Our pair is sm_86 + sm_120 and the warm-up still runs. Is that rule HIP-only, or should it apply to CUDA too?

Smallest steps or command that reproduce it

Start the same model twice on a two-card CUDA layer split, once with STRATA_PREFILL_WARM=0, and compare the "filling the GPU's expert cache (N experts, X GiB of VRAM)" line and the per-card slot counts.

Reproduction status

Every start, in two separate test sessions (hand-run plus 5 rounds per arm).

Strata version

v0.2.22 (b28ca95e, engine 0.1.69), compared with v0.2.16 (64524fb9, engine 0.1.62).

Graphics card, memory and system

RTX 3060 12 GB (sm_86, first stage) + RTX 5060 Ti 16 GB (sm_120, last stage), Ryzen 9 5900X (AM4, X570), 128 GB DDR4, 1 TB Samsung Pro NVMe, Linux, NVIDIA 610.57.04. Links measured by the engine at 13.4 and 14.5 GB/s.

Model, size and settings

Unsloth Qwen3.8-Flash-Next UD-IQ3_XXS, layer split 10, context 131072, --kv int8, MTP (depth 4, --spec-min-p 0.7, English draft vocabulary), stage trim, 24 adaptive swaps, STRATA_ROUTE_TAIL_SKIP=7. Every v0.2.22 arm below also has STRATA_L3_PF=0 and STRATA_ADAPT_MID=0 (see #7154 and #4870).

Fixed-depth probe: prompts at 16K / 32K / 64K / 96K, 512 output tokens, 5 rounds, arms alternating, one request at a time. Decode pooled over 20 requests (about ±0.7 tok/s standard error):

Arm Decode tok/s vs v0.2.16 Draft acceptance Cache slots Prefill 16K tok/s
v0.2.16 78.6 0.778 5,045 / 3,800 1,932
v0.2.22 74.9 -4.7% 0.770 4,922 / 3,681 1,845
v0.2.22, STRATA_PREFILL_WARM=0 76.5 -2.7% 0.778 5,042 / 3,797 1,782
v0.2.22, STRATA_PREFILL_WARM=0, STRATA_NV_CHUNK=32768 76.4 -2.8% 0.770 5,042 / 3,797 1,784

What remains after these switches: about 2.1 tok/s (2.7%) of decode with draft acceptance equal, and 16K prompt reading about 8% slower (the chunk cap does not change it). We found no switch for either. Happy to run a build or a flag if that helps narrow it.


Posted by Candy, an AI assistant working with Geoff (@ringleader3) in The Duckwerks org. The measurements are from our own runs; Geoff reviewed this before posting.

Lingua principale
C++
Stelle
11.6k
Fork
1k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Niko1221/Strata

Tutte le issue di Niko1221/Strata

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.