Repository navigation
Conversation
…rena, counted_arena_bytes) qwen3moe::place carried `machine` (placed_on at the m = 1 scratch plus an arena) and `counted_arena_bytes` (the scratch past the m = 1 scratch), and qwen35moe's fixture spelled `SCRATCH + arena` out again. Both now have one owner beside `placed_on`: `workstation::placed_with_arena` and `workstation::counted_arena_bytes`. The qwen3moe copies are gone and their callers (the gates' shared placement, the qwen35 open, the Qwen3 bodies' refusal of an arena past the plan's count) call the owner. `placed_on` keeps its scratch argument. A move: no kernel, launch or byte formula changes. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… directory crates/model/src/arch/qwen35moe/fixture/qwen35moe.rs has no row, so a change to it keeps the full list (just affected --narrow: 'no row of tools/gate-paths.tsv maps it'). python3 tools/recipes.py reach names three gates that reach it through a dependency: gate-gpu-gemma-embedding2-e2e, gate-fixture and gate-fixture-budget. The row covers the directory and lists the three. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
There was a problem hiding this comment.
Verdict: MUST_FIX: The common arena extractor still has a model-specific duplicate.
Must fix
1. Remove the duplicate Qwen3.8 arena extractor (kind B, R14)
crates/placement/src/placement/workstation.rs:285 duplicates crates/model/src/arch/qwen35moe/place.rs:1208. Both subtract the same workstation SCRATCH from the same Card::scratch_bytes to obtain the load's arena allowance. No architecture fact distinguishes them.
Keeping both lets shared budget accounting diverge. Removing the model helper now eliminates one definition without adding an abstraction.
Delete counted_ubatch_bytes and its docs and attribute from crates/model/src/arch/qwen35moe/place.rs. Replace its sole call at crates/gpu/src/arch/qwen3moe/body38.rs:1313 with:
let counted = model::placement::workstation::counted_arena_bytes(spec);Checked
Duplicates: 2 relocated helpers checked by Grep; duplicate above. Dryer reported 0 pairs; gpu-gates callers were checked by hand.
Complexity: crapper flagged no changed function.
Silent failure: 1 saturating subtraction followed through both placed loaders; a zero arena allowance reaches a named insufficient-arena error.
Tests: static mutation review. Dropping SCRATCH from placed_with_arena fails full-card equality. Returning zero from counted_arena_bytes fails the new round-trip assertion and existing placed-count checks. The context-shortage helper retains its half-context and probe assertions.
Gates: no thresholds or pins moved; the fixture row adds three existing gate selections.
Escape catalog: no matching patterns.
Performance: load-time placement arithmetic only; no decode, prefill or kernel work changes.
Notes
Rust tests and GPU gates were not run here. GPU evidence lacks nvidia-smi output, the model path, and gate commands with output tied to the current base and head; the detailed runs cite earlier commits.
Card check: needs-gpu. This pull request changes crates/gpu-gates/src/bin/gate_qwen35moe_e2e.rs, crates/gpu-gates/src/bin/gate_qwen3moe_e2e.rs, crates/gpu-gates/src/bin/shared/qwen35_open.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: #509
|
Superseded by #525, one train with the review fixes applied. |
Supersedes #386 (rebased onto origin/main 49ae7be; a force push to its branch is not allowed). The gate-paths row for
qwen35moe/fixture/**is back, and gate-fixture-budget is added: main's derive does not cover it.After the rebase (b2):
just narrow3 ptx-scan pairs identical; 171 of 171 gates stay selected (place.rs and workstation.rs rows). Fixture tier, 106 items, --no-canary:DONE total=180 red=3 deferred=212. Reds: gate-gpu-lib rc 124 (main's hang, #505), gate-gpu-qwen38-nodes-remote rc 101 (the defect #402's successor fixes), gate-gpu-nemotron-serve rc 1 (the Nano fixture's 1 GiB budget against the seat's 2.38 GB; before, the gate was never run here, rc 66). lib with --skip host::nvtier: 238 passed. remote-static origin/main rc 0.What and why
A placed load's machine and the arena the body counts in its scratch were laid out by a qwen3moe-only wrapper (
qwen3moe::place::machine,counted_arena_bytes). The qwen35moe fixture, the two gpu bodies' load checks and four gate files called it. Any family that places one card the same way would have copied it.This moves both into their common owner,
workstation:placed_with_arena(spec, layers, arena)isplaced_on(spec, layers, SCRATCH + arena), andcounted_arena_bytes(card)is the card's scratch pastSCRATCH. The qwen3moe copy is gone and every caller reads the common one. No kernel, launch or byte formula moves.Release notes: internal — one owner for the placed machine's arena.
Per-model copies
crates/model/src/arch/qwen3moe/place.rsmachineandcounted_arena_bytes(they were at lines 43 and 50 of the base file).crates/placement/src/placement/workstation.rs, the common owner.Move proof
just canon-check 402f9abc6on the box:canon-check: 3 bins, 908 entries: 908 identical, 0 reordered-only, 0 differs, 0 only-on-one-side; rows equal (jit columns not compared: no-jit both). Bins scanned:gate_glm5next_e2e,gate_kquant,gate_swap.just checkrc 0 andjust lintrc 0 on the box. Of its 62warning:lines none points at a line this change touches (the one inqwen3moe_place.rsis main's dead-codedense_shortage_halves_the_default_context).GPU Evidence
Box: RTX 3090 and RTX A6000, driver 615.71.09. Base
402f9abc6(origin/main), headdc729e8e3. All jobs through the box queue,tools/gate-batch.sh --round-ledger.Fixture tier,
DONE total=7 red=0 tier=fixture wall=924s deferred=12 real_only=1 real_file=1:gate-gpu-gates-libs2386, A6000, rc 0:test result: ok. 122 passed; 0 failed; 3 ignoredandok. 5 passed.gate-gpu-libs2387, 3090, rc 0:ok. 273 passed; 0 failed; 0 ignored; 0 measured; 4 filtered out(and three moreokresults).gate-gpu-qwen35moe-e2es2392, A6000, rc 0:gpu-gate.sh: gate_qwen35moe_e2e ran 17 s (exit 0).gate-qwen35moe-metas2396, A6000, rc 0:ok. 2 passed.gate-qwen3moe-metas2395, 3090, rc 0:ok. 5 passedandok. 3 passed.The two gates the fixture tier defers by name ran in the real tier on the real files,
DONE total=2 red=0 tier=real wall=326s:gate-placements2402, 3090, rc 0:ok. 11 passedandok. 138 passed.gate-gpu-qwen3moe-e2es2401, A6000, rc 0:gpu-gate.sh: gate_qwen3moe_e2e ran 118 s (exit 0).Code shape
One owner for the placed machine's arena in
workstation; the callers' docs name it. No comment carries a date or an issue number. No gate or lint was relaxed.This PR was written by a bot (a Claude Sonnet 5.5 agent in the Claude Code harness) under the lead's direction.
🤖 Generated with Claude Code