Skip to content

gpu-gates: the qwen4exp e2e fixture budget carries the load's store page rounding - #1002

Merged
juliankang4 merged 1 commit into
midagedev:mainfrom
juliankang4:dgx-spark-q38-fix-e2e-card-leg-experts
Oct 30, 2026
Merged

juliankang4 merged 1 commit into
midagedev:mainfrom
juliankang4:dgx-spark-q38-fix-e2e-card-leg-experts

Conversation

@juliankang4

Copy link
Copy Markdown
Collaborator

gate_qwen4exp_e2e의 fixture 카드 예산에 로드가 실제로 빼는 store page rounding을 더해, card leg가 전문가 절반(256)을 정확히 판정하도록 고쳤습니다.

What and why

The fixture's card budget comes from the header and is planned without the store page rounding that the load reserves out of that same budget (Open38::plan). The load therefore places fewer experts on the card than the header's half, and the card leg's "half the experts on every layer" check fails on GB10.

gate_qwen4exp_e2e now reads the card's store page, computes the padding with PlanInputs::room_padding and passes it as extra to tier::plan_levers, so the planned budget carries the same reserve. The real tier does not use extra, so it is unchanged. In tier.rs only the docs and the overflow message of plan_levers and budget_levers change: extra is no longer described as draft-only.

Release notes: Fixed: the qwen4exp end to end gate's card leg budget now includes the load's store page rounding

Code shape

The review reads these first. A box left unticked needs one line of why.

  • No second copy. Logic two models (or two call sites) share has one common owner; I lifted it there instead of
    copying it (AGENTS.md "Common code first", docs/rust-quality.md R14). Where I found an existing copy, I
    named it below.
  • Model code holds only architecture facts. A model's own files carry only what its architecture forces
    (tensor shapes, the attention kind, the quant). A common owner gained no per-model branch, flag or trait method.
  • Dead code is gone. Nothing I made unused is left behind (functions, flags, gate clauses, docs).
  • No silent failure. Undefined input is a named error or panic, never a defined-looking output.
  • Comments state what is true now. No dates, issue numbers or how a bug was found (tools/check-comments.sh).
  • No relaxed gate. No band, tolerance or lint moved to make a check pass; a re-pin carries PIN(YYYY-MM-DD):
    and its reason.
  • cargo fmt and cargo clippy are clean on what I touched; the lint count did not go up.

Duplication found or removed (path:line), or "none": none

What I ran

Base ffe7d04e823287f4e55f66836e220ec2e85da6b9, head 4a1a3f6cb5583cc4f387330c9f32f7c6e98029f1. The gate runs on the qwen38 fixture (sha256 4cf13c5af27f38cc616e4bd6f0e63d394df47ba464ba85dbe83f75d650a96e09) with BLOOMERY_TIER=fixture.

$ BLOOMERY_BOX_LOCAL=1 BLOOMERY_TIER=fixture just gate-gpu-qwen4exp-e2e

Before the fix (upstream 977e8e74d47c59b00f7672421eecf0a4c32b30d3):

plan card=GB10 experts=Card slots=1 ctx_max=3072 ubatch=3072 host_experts=1029 card_experts=1019 card_layers=4 ple=host ... card_budget=9375608832
card leg plan: 4 of 4 layers hold routed experts on the card, a layer's count Some(254)..Some(255) (want 256 on every layer: half the experts, the header's budget) FAIL
gpu-gate.sh: gate_qwen4exp_e2e ran 363 s (exit 1)

After the fix:

plan card=GB10 experts=Card slots=1 ctx_max=3072 ubatch=3072 host_experts=1024 card_experts=1024 card_layers=4 ple=host ... card_budget=9385701376
card leg plan: 4 of 4 layers hold routed experts on the card, a layer's count Some(256)..Some(256) (want 256 on every layer: half the experts, the header's budget) PASS
gpu-gate.sh: gate_qwen4exp_e2e ran 363 s (exit 0)

Hardware (if the change is for a machine)

Card Driver CUDA
NVIDIA GB10 (DGX Spark) 595.84 13.3

AI help

AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.

@github-actions github-actions Bot added gpu The card engine: crates/gpu*, crates/app needs-gpu Changes code a card must check, and carries no gate run on a card labels Oct 30, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: CLEAN: The fixture budget now includes the loader's store padding without changing the expert-count contract.

Checked

Duplicates: 0 new functions, types or constants. The change reuses room_padding and plan_levers.

Complexity: the change adds no branches.

Silent failure: 0 new suppression sites. Card resolution, page-query and padding errors propagate to the gate's result; budget overflow remains a named error.

Tests: none changed. The PR reports that passing 0 instead of rounding at crates/gpu-gates/src/bin/gate_qwen4exp_e2e.rs:621 fails the GB10 half-expert check. The card leg uses the same context, one slot and no draft as the padding calculation.

Gates: no pins, bands, assertions or clauses changed. The real tier ignores extra.

Performance: gate initialization only; no decode or prefill work changed.

Escape catalog: none of C1–C4 matched.

Notes

No build or GPU gate was run during validation.

The PR supplies GB10 gate output, but omits the required nvidia-smi line. GPU evidence is incomplete.

Card check: needs-gpu. This pull request changes crates/gpu-gates/src/bin/gate_qwen4exp_e2e.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)

@juliankang4

Copy link
Copy Markdown
Collaborator Author

The review is done and the contribution check passed, so I'm merging this.

@juliankang4
juliankang4 merged commit 2a20a6e into midagedev:main Oct 30, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gpu The card engine: crates/gpu*, crates/app needs-gpu Changes code a card must check, and carries no gate run on a card

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant