Repository navigation
host::xstream, placement::workstation, seats: a load that streams reserves its lane's pinned staging on the host before its plan, the lane pins at most a half of slots, and the tiered open plans on the run's machine - #1089
Conversation
…ed matrices fill the NVMe arena from their shards, the block scales moved after the codes A stack a checkpoint folder locates reads each expert's matrix into the arena where the folder keeps it: its codes and its block scales are two runs, each in any shard, read O_DIRECT into a window each, and the fill moves the scales to follow the codes, the one run the host's planes and the residency source read. The arena's floor counts a part at a window a run (arena_part_bytes), so a stack of NVFP4 rows takes its two planes' windows. The file_backed refusal holds for every shard a run lies in. The residency source reads a paged planes matrix from its slot, so the tier no longer refuses a folder and the unset word no longer turns off beside it.
…ough the NVMe arena, two parts an expert A paged layer holds two routed stack rows (a relu² expert's up and down) or three (a gated expert's gate, up and down). The arena carves a slot of the layer's own windows and fills only the parts the layer holds; the leg's [gate, up, down] names a relu² layer's up in the gate slot again, which note_parts maps to the up's row, refusing a leg that leaves one of the plan's rows unnamed. The relu² refusal at the host leg's entries is gone. The card leg over the arena keeps the host leg for a relu² layer, since no gate·up kernel runs relu(up·x)². gate_nvtier's relu2 clause pages the real file's ups and downs as relu² experts and holds the tier's sums to the mapping's bits.
…lan pages the host experts the room cannot hold on the NVMe tier The hybrid plan inputs now read the host's room and the arena's given bytes (PlanInputs::new) and run the shared expert_nvme_tier split after every arm, so a Bolt or Lightning plan whose host need passes the room pages the rest on the tier its placed body already attaches. The NVMe arena carves each paged layer over its own expert count (ModelTensors::layer_experts; Bolt's layers hold 240 to 496), its stacks' runs read where the host reads them (host_lock::expert_runs). The nemotron seat prints the nvtier record at load and after each prompt call through record::eprint_nvtier, the one stderr printer of it, which the ds41, glm and qwen38 seats now call too; HostTier::nvme_tier reads the tier from the host run.
… tier their bodies already serve, and the seats print its nvtier record The three bodies attach the tier through the shared hosted_hybrid assembly, but their plan inputs never opted into it, so a host room under the need was refused as NoNvmeTier. Their describe now calls with_nvme_tier, as Flint's does; MiMo's host run attaches no tier and keeps the refusal. The minimaxm3, musespark and hybrid seats print the nvtier record at load and after each prompt call.
…est the host and the NVMe tier read in place
A checkpoint folder's plan that pages routed experts splits a stack between the card, the host and the NVMe tier, and the tier's arena now fills from the located stack where the folder stores it. OnCard refused every such split ("on Card(0) and Host and Nvme"), and a stack the host and the tier hold whole, so no folder load could page; it now takes the card's share and skips the off-card rest of a stack the located header holds in place, and still refuses one the part source makes.
…he PLE table reads it from the NVMe tier The row source followed only whether the split was a header alone, so a located folder (Qwen3.8 NVFP4, whose PLE table the part source assembles from its value and block-scale planes) planned the table on the host whenever the room held it, and its load refused the host placement by name. The source is now the part source's whenever the split does not hold the table as one file run.
…s and the expert stream's, and the hybrid seats print it a prompt The census needed an NVMe tier, so an all-RAM split printed no record of where its routed picks were served. It now reads a host run's picks with or without a tier (the arena's terms 0 without one) and counts, of the card's, the prompt slots the expert stream copied over the link. The record and its span are one owner (record::census_record, record::CensusSpan) for gate_nvtier and the Qwen3.8 seat; the MiniMax-M3, Muse Spark and hybrid seats print the steps since the last prompt and each prompt. The seats that print the nvtier record and the census (hybrid, Solar-Open2, MiniMax-M3, Muse Spark, Nemotron-H) register both (record::groups::tier) and require them at open: a line of a kind the binary did not register ends the engine thread.
…the least its card's parts read, so the NVMe split leaves them room and the load holds the plan's need
…erves its lane's pinned staging on the host before its plan, the lane pins at most a half of slots, and the tiered open plans on the run's machine The expert stream's lane pins its staging with cuMemHostAlloc for the load's life, and no plan counted it: MiniMax's need read pinned=0 beside 64 slots of 18.35 MB, about 1.17 GB past a plan with 1.03 GB to spare, and the page cache fell short of the host experts by that much. - workstation::STAGING_SLOTS (64, from host::xstream) and reserve_stream_staging set the slots of a ring slot aside as the host reserve XSTREAM_STAGING_RESERVE, which HostNeed counts beside the other reserves and classes as pinned (NeedTerm::StreamStaging), not inside the part reads' peak. - place_hybrid::stream_slot_bytes is the one ring slot: the widest layer's routed expert. MiniMax and Muse Spark pass it through PlanInputs::streaming; qwen35moe::PlanInputs::stream_slot gives Qwen's, 0 where a routed stack reaches the card route as NVFP4 planes, which the ring pass does not read. - Every load that streams asks the common rule (xstream_rule::plans_ring) before its plan and reserves the staging: the tiered seats (MiniMax, Muse Spark) on the ringed plan's machine, the Qwen3.8 seat on every machine of its placement (Place38::stream), generate_qwen3moe's machine38, the MiniMax gates' seat under split, and the Qwen3.5 e2e gate's placed residency loads (PlaceQ3::streaming). - XStream::new pins at most the ring's half of slots: one layer's stream is never wider, so the slots above it held nothing. - tiered::Open takes the run's machine, side model, part reads and staging included, instead of four seats rebuilding it without them.
There was a problem hiding this comment.
Verdict: CLEAN: The validated findings are advisory; no must-fix item remains.
Non-blocking
⚠ Measure the added drop bookkeeping: crates/gpu/src/host/nvtier.rs:2854.
For a three-part GGUF layer, each mapping-read drop planned by runs_of adds two scratch allocations and three nonempty sorts of expert ranges. At r such calls per token, that is 2r extra allocations and 3r range sorts under the drop queue lock [derived].
The PR reports storage bytes but no timed decode/prefill A/B. Dispatch changes require a same-lease A/B under AGENTS.md. Attach that comparison on the contributor's card. Resolve the immutable shard ordering at load if this work affects the step.
⚠ Show the staging-cap gate result: crates/gpu-gates/src/bin/gate_xstream.rs:389.
The new assertion requests HALF + 1 staging slots and expects HALF. The reported commands omit the owning xstream gate and FAIL-first evidence for this clause. Run just gate-gpu-xstream and show that removing the production .min(half) turns the cap assertion red.
Optimization headroom
- C. More in flight: crates/gpu/src/host/nvtier.rs:3539. Codes and scales read sequentially within each part. Scheduling both runs on the existing reader workers, then moving scales after both finish, exposes up to six independent reads per gated two-plane expert instead of three serial pairs [derived], bounded by the worker count.
Checked
Compared the cited drop planner with the base, followed mapping-read completion through the queue lock, and inspected the staging-cap assertion and reader dispatch. Neither advisory finding meets kind A or B. No ledger lessons apply. No inline suggestions or issue candidates were supplied.
Notes
Static review only. Builds and hardware gates were not rerun.
Card check: gpu-evidence. This pull request changes crates/gpu-gates/src/bin/gate_minimaxm3_e2e.rs, crates/gpu-gates/src/bin/gate_minimaxm3_prefill.rs, crates/gpu-gates/src/bin/gate_nvtier.rs … and carries a gate run on the author's card, which counts as verified.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
|
The review is done and the contribution check passed, so I'm merging this. |
호스트 메모리 계획이 expert stream의 pinned staging과 폴더의 part read를 빠뜨려 생기던 거절과 과다 계획을 고치고, NVMe tier를 쓰는 모델 계획을 공용 owner로 맞춘 PR입니다.
What and why
A load that pages experts through the NVMe tier or streams them to the card sized its host room without two terms it later needs: the pinned staging the expert stream allocates, and the least a checkpoint folder's part reads need. The folder serve of the Qwen3.8 NVFP4 checkpoint was refused at its
needrecord because the plan's reserves held 0 B. The expert stream also pinned a fixed 64 slots, more than one layer's stream can use.This change reserves both on the host before the plan, from one owner each (
placement::workstation). The stream pins at most half of its slots, and the tiered seats plan on the machine the run chose. The NVMe tier now takes each layer's own expert count and a relu² layer's up and down parts, so the Nemotron-H MoE, MiniMax-M3, Muse Spark and Solar-Open2 plans page on it, and a checkpoint folder's paged matrices fill the arena from their shards.Before, on the RTX 5090 below, the Qwen3.8 NVFP4 folder serve stopped with:
After, the same serve plans (
need bytes=68932596416 pinned=448000704 ... cache=68484595712), loads and answers its requests (STEP-RC serve-qwen38-nvfp4 0).Release notes: Fixed: a load that streams experts or reads a checkpoint folder in parts now reserves its pinned staging and part reads in the host plan, so the Qwen3.8 NVFP4 folder serves again and Nemotron-H MoE, MiniMax-M3, Muse Spark and Solar-Open2 can page experts on the NVMe tier.
Code shape
The review reads these first. A box left unticked needs one line of why.
copying it (
AGENTS.md"Common code first",docs/rust-quality.mdR14). Where I found an existing copy, Inamed it below.
(tensor shapes, the attention kind, the quant). A common owner gained no per-model branch, flag or trait method.
tools/check-comments.sh).PIN(YYYY-MM-DD):and its reason.
cargo fmtandcargo clippyare clean on what I touched; the lint count did not go up.Duplication found or removed (
path:line): the three serve seats (serve_seats/hybrid.rs,minimaxm3.rs,musespark.rs) each carried the same census andnvtierrecord code; it now lives inCensusSpan::stepsandCensusSpan::prompt(crates/gpu-gates/src/record.rs). The stream staging reserve has one owner,workstation::reserve_stream_staging, and one slot rule,place_hybrid::stream_slot_bytes. A relu² layer's expert parts and the stack runs reusehost_lock::expert_runsthroughnvtier::stack_runsinstead of a second stride walk. The remaining pairs the duplicate scan reports are different code (each seat's own prompt call, each function's own refusal label).What I ran
Base is
72f7f9f52(upstream/main). Head isca991a925. Commands run on the RTX 5090 below, with the Qwen3.8 NVFP4 folder (nvidia/Qwen3.8-Flash-Next-FP4-Local), MiniMax-M3.1 UD-Q2_K_XL, Muse Spark UD-IQ2_XXS and the Nemotron-H and Solar-Open2 checkpoints, at the card's default budget,--ctx-size 8192, greedy decoding.Commands, each ending rc 0 (
BLOOMERY_ARCH=sm_120a BLOOMERY_BOX_LOCAL=1):just gate-gpu-nvtierwith the lib and parts tests:78 passed,parts::tests::a_paged_folder_plan_holds_its_loads_reads1 passed, record lists25 passed, relu² paging10 fills of 21504000 B.bloomery-serveon Solar-Open2, Lightning, Qwen3.8 NVFP4, MiniMax-M3.1, Muse Spark and Lightning at an 8 GiB room:STEP-RC serve-qwen38-nvfp4 0and the same for each of the others.bloomery-serveon Qwen3.8 GGUF at--place a:need bytes=106521636544 pinned=703591104,xstream=split xstream_half=78 xstream_staging=64, two requests answered.bloomery-serveon Qwen3.5 placed withBLOOMERY_CARD_BUDGET=8G:need ... pinned=221184000, two requests answered.The MiniMax-M3.1 load reserves its stream staging and the lane pins half of its slots: base
need bytes=125290266624 pinned=0, headneed bytes=124765323264 pinned=1566572544(xstream_staging=47). Storage reads per request on the same card, same round, same file (/proc/<pid>read_bytes):Unit tests on the changed owners, each also run with its production line removed to see the test fail:
Hardware (if the change is for a machine)
NVIDIA GeForce RTX 5090, driver 595.99.02, 32607 MiB, power limit 400 W.
AI help
AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.