Repository navigation
gpu-gates, model: plan the fixture tier's card budget beside what its card sets aside - #785
Conversation
… card sets aside The Qwen3.8 fixture records the card budget under which its plan on the 3090 holds half the experts on every card-eligible layer. The fixture tier plans on the visible card, and on a unified card (DGX Spark) the stage reserves the activations' MMA forms beside the 3090's terms, so the recorded budget left every layer a few experts short of half. A family's fixture budget now names what its plan sets aside on a card past the card it was planned on (Qwen3.8: the stage's reserves), and the fixture tier plans under the recorded budget plus that set-aside on its own card. The recorded value, its check and the lever comparison are unchanged, so discrete cards plan as before.
…makes The regeneration advice was tested on its formatter alone, so a production call that dropped it still passed. The re-plan and its error mapping are now one function that header_budget calls and the test drives.
There was a problem hiding this comment.
Verdict: CLEAN: No must-fix defect is established in the changed code.
Non-blocking
⚠ Validate the production budget connection: crates/gpu-gates/src/tier.rs:984.
Replacing the assignment with planned(&planner, split, path, recorded)?; leaves the changed tests green: the fixture test adds the reserve itself, and the levers test supplies it by hand.
Run the existing fixture-tier MTP budget clause (d) on a unified-memory card with this mutant to confirm failure, then attach the final-head passing run. This verifies that header admission carries the reserve into the gate's plan.
Checked
Duplicates: dryer's one pair shares fixture-construction shape, with different architecture facts and rule owners. The new reserve calculation reuses Card::set_aside_bytes.
Complexity: crapper flagged no changed function.
Silent failure: the zero/default paths correspond to an absent budget, an inapplicable adjustment or a build without a device. Malformed headers, stale budgets and budget-sum overflow return errors.
Tests (static mutation inspection): dropping either budget addend breaks the sum assertions; returning zero from the unified-card callback breaks the half-expert assertion; dropping stale-error mapping breaks the regeneration assertions. The changed tests do not cover carrying the callback result through header admission.
Gates: no pins or tolerances moved; the half-per-layer contract remains.
Card identity: budget adjustment and card selection share the cached fixture card. Changes run during fixture setup, outside decode and prefill.
Escape catalog: C1–C4 do not match.
Notes
The reported fixture test predates the final alias edit. Complete GPU evidence is absent: no selected just gate-* run with output, tested commit pair or model-file identity is attached. This review used static tracing; no builds or gates were run.
Card check: needs-gpu. This pull request changes crates/gpu-gates/src/bin/gate_qwen4exp_mtp.rs, crates/gpu-gates/src/bin/shared/glm5next_tier.rs, crates/gpu-gates/src/tier.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)
Filed outside this PR: #786
|
The review is done and the contribution check passed, so I'm merging this. |
통합 메모리 카드에서 Qwen3.8 픽스처 계획이 레이어마다 전문가를 몇 개 덜 담던 문제를, 카드가 따로 떼어 두는 바이트를 예산에 더해 계획하도록 고칩니다.
What and why
The Qwen3.8 fixture records the card budget under which its plan on the RTX 3090 keeps half of the experts on every card-eligible layer. The fixture tier plans on whatever card is visible. On a unified-memory card such as the DGX Spark's GB10, the stage also reserves the activations' MMA forms, which the 3090's plan does not. Under the recorded budget alone, every layer on the GB10 ended up a few experts short of half.
A family's fixture budget can now name what its plan sets aside on a card past the card it was planned on (
Budget::card_set_aside). For Qwen3.8 that is the stage's extra reserves on the given card (card_set_asideinqwen35moe/fixture.rs), and it is 0 on the 3090.tier::header_budgetreturns aHeaderBudgetwith the recorded value and this set-aside on the fixture tier's card, andbudget_leversplans underrecorded + set_aside + extra. The recorded value, its staleness check and the comparison against aBLOOMERY_CARD_BUDGETlever are unchanged, so discrete cards plan as before. A set-aside that overflowsu64is a named error.The same change moves the stale-budget re-plan and its error mapping into one function,
planned, thatheader_budgetcalls. The regeneration advice was tested through its formatter alone, so a production call that dropped it was not caught. The test now drivesplanned. The fixture tier's card lookup also moves out oftier::cardintofixture_card, whichheader_budgetshares.Release notes: internal: the fixture gates plan Qwen3.8 on a unified-memory card with the experts its recorded budget promises.
Code shape
card_set_aside, andheader_budgetandbudget_leverscarry it. The Qwen3.8 file's machine layout is nowbudget_machine, which bothcard_expertsandcard_set_asideuse.Budgetgained acard_set_asidefield that isNonefor every other family, and no per-model branch.fixture_budget_erroris folded intoplanned.u64and a budget sum that overflows are named errors.cargo fmtandcargo clippyare clean on what I touched, and the lint count did not go up. The repository's t0 check tier ran on this head: DONE tier=t0 total=37 red=0 wall=690sDuplication found or removed (
path:line): the testhw_fixture_q38_budgethad a second machine layout beside its plan closure for the unified card; it is one closure that takes the card. The test'smachine_for_expertscall repeatsbudget_machineinqwen35moe/fixture.rs, which is private; I left it, because opening it would add a public item only a test uses.What I ran
Commands and output are from the DGX Spark below. I ran no timing measurement, because this change touches no decode, prefill or kernel path.
hw_fixture_q38_budgetis#[ignore]d and needs the Qwen3.8 fixture generated from the model file. On the Spark I generated it once with the tree's ownfixture generateand ran the test in the fixture tier (BLOOMERY_TIER=fixture):Its output on the GB10:
The same test pins the card-dependent plan on both card conditions. On the 3090's spec the family's set-aside is 0, and the plan under the recorded budget holds
[256, 256, 256, 256]. On the unified spec the recorded budget alone no longer holds half (theassert_ne!on[253, 253, 252, 252]), and the recorded budget plus 45379584 B does.The tested head is one lint fix earlier than the pushed head: the
card_set_asidefield type became the aliasCardSetAsidebecause clippy'stype_complexityflagged it on the GB10. Nothing else differs. I did not rerun the card test on the final head.The
tier.rsunit tests changed with the new field. The levers test builds fixture headers with a set-aside and checks the planned budget as the sum of the recorded budget, the set-aside and the draft reservation. It also checks that a lever matching only that sum is refused and that an overflowing sum is an error. A second test drivesplannedwith a stale budget and checks that the error names the file, the recorded budget, the counts and the regeneration step.Hardware (if the change is for a machine)
DGX Spark, driver 595.84, CUDA 13.3, from the node's
nvidia-smi(the test ran in a CUDA 13.3.1 container image):AI help
AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.