Repository navigation
parts, ctx_ask: a folder load's refusal of a paged plan is short on the host, so auto and the context fit plan below it - #1062
Conversation
…he host, so auto and the context fit plan below it
There was a problem hiding this comment.
Verdict: CLEAN: The paged-plan refusal reaches context fitting as a host shortage; no blocking defect was found.
Non-blocking
⚠ Supply FAIL-first and gate evidence: crates/gpu/src/parts.rs:1539 and crates/gpu-gates/src/generate.rs:3026.
The body reports passing tests and --plan runs, but no FAIL-first failures or selected just gate-* commands with output, as requested by CONTRIBUTING.md.
Remove the new admission guard and source traversal separately, then attach each failing assertion, the restored passes, and the gate results selected by just affected.
Checked
Duplicates: 13 new declarations checked, including test types and implementation methods; no duplicate requiring consolidation. The existing NoKv was moved and reused. Dryer reported zero pairs; gpu-gates was checked manually.
Complexity: crapper flagged no function.
Silent failure: four refusal/fallback sites followed. Saturation still rejects the plan; absent room uses machine capacity; zero paged bytes retains row validation; unclassified errors propagate to the caller.
Tests, static mutation audit: removing parts.rs:575's guard fails the typed-refusal assertion; omitting ctx_ask.rs:243's paged-byte addition fails need equality; removing generate.rs:315's source traversal fails the wrapped-short assertion. Tests were not executed in this review.
Gates: no existing threshold, tolerance, test or case removed or relaxed.
Escape catalog: no pattern matched.
Adversarial checks: paged experts are refused before row admission; the actual GpuError::Plan exposes its source; row-gathered NVMe tables do not trigger the expert refusal; unrelated planning errors remain errors.
Performance: load planning only; no hot path changed.
Card check: needs-gpu. This pull request changes crates/gpu-gates/src/generate.rs, crates/gpu/src/parts.rs and carries no gate run on a card (CONTRIBUTING's evidence list); a maintainer adds gpu-verified after one.
🔨 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. |
--parallel auto,--parallel 8같은 설정이 NVFP4 폴더에서 "paged plan" 거부로 멈추던 문제를 고쳐서, 호스트 메모리 부족으로 읽고 더 작은 계획을 찾게 했습니다.What and why
On a DGX Spark, a checkpoint-folder start whose plan pages routed experts to the NVMe tier stopped with
parts::load: blk.0.ffn_down_exps.weight is placed on Card(0) and Host and Nvme .... A folder load serves no NVMe expert tier, soOnCard::of_in_placerefused the plan as a shape error, and the context fit did not read that error as "the host is short".--parallel auto,--parallel 8and a set--ctx-sizewhose share pages all stopped there instead of planning below the paged plan. With the MTP draft unset, the same error made the draft search yield, so the server silently dropped the MTP draft (--parallel 5on NVFP4).placement::ctx_askgainsUnpaged, which names the paged plan's need and room and converts toShort { on: Host, .. }.OnCard::of_in_placeraises it first, so every placed folder load names it.short_inincrates/gpu-gates/src/generate.rsfinds it anywhere in an error's source chain, so the seats' fit reads it as a host short and searches below it. The NVFP4 value indocs/contrib/dgx-spark.mdsection 2.3 is filled in from the head's--plan.Release notes: Fixed:
--parallel auto,--parallel 8and a--ctx-sizethat needs paged experts now fit or are refused by name on a checkpoint folder instead of failing withparts::load, and the MTP draft stays on at--parallel 5on NVFP4.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), or "none": none.Unpagedsits besideHostShortinctx_ask.rsand is raised in the one shared folder check, so no seat or family carries its own copy. The hybrid families'PlaceError::NoNvmeTieris a plan-time variant that names its engine and is a different case.What I ran
Tested base
008876af1, headb37100fb0, on a GB10 withNVIDIA GB10, 595.84,sm_121a. Each row isbloomery-serve --planon the NVFP4 folder (nvidia__Qwen3.8-Flash-Next-NVFP4), which prints the start's records and exits before it loads anything. Base and head binaries were built from the same tree and run back to back, withBLOOMERY_REF_MODELset to the folder.--plan, NVFP4)--parallel autoplaced on Card(0) and Host and Nvmectx rule=target ctx=262144 slots=3,from=auto--parallel 8placed on Card(0) and Host and Nvmectx rule=fitted ctx=57344 slots=8--parallel 6 --ctx-size 1572864placed on Card(0) and Host and Nvmea slot holds at most 94208 here; ask 565248 or less--parallel 5draft yield card_bytes=3449063852 with=0 without=110592,ctx rule=fitted ctx=110592 slots=5ctx rule=fitted ctx=98304 slots=5,draft keepOn the FP4-Local folder (
nvidia__Qwen3.8-Flash-Next-FP4-Local) the head printsctx rule=target ctx=262144 slots=3for--parallel auto,ctx rule=fitted ctx=65536 slots=8for--parallel 8andask 589824 or lessfor--parallel 6 --ctx-size 1572864; the base refuses the last two withplaced on Card(0) and Host and Nvmeandplaced on Card(0) and Nvme. The drafted fit at--parallel 5on NVFP4 is exact at the 1,024 step:BLOOMERY_DRAFT=mtp --parallel 5 --ctx-size 491520printsctx rule=set ctx=98304 slots=5, and--ctx-size 496640exits 80 witha slot holds at most 98304 here.Tests that cover the change (
cargo oxide test --arch sm_121a -- -p <crate> --release ...):No kernel, decode or prefill path changes.
Hardware (if the change is for a machine)
DGX Spark (GB10), driver 595.84,
sm_121a, one card, one unified memory pool.--planreads its room fromMemAvailable, so the fitted contexts above move by a few thousand positions with the host's free memory at each start.AI help
AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.