Repository navigation
width: a losing chain probe runs one pass, and the diagnostics carry the gate rates - #975
Conversation
There was a problem hiding this comment.
Verdict: CLEAN: No reachable behavior failure or proven quality defect was found in the changed code.
Non-blocking
⚠ Complete the hardware evidence: crates/runtime/src/width.rs:1233. The PR supplies gate output and an A/B table, but omits the nvidia-smi line and the timed client command. Attach both with their output to satisfy CONTRIBUTING.md and make the GB10 comparison reproducible. The submitted evidence does not qualify for gpu-evidence.
Checked
Duplicates: 5 new functions checked; none duplicated. Dryer reported 0 runtime pairs; gpu-gates was outside its scan and was checked manually. Rate calculation reuses gate_rate; record formatting has one shared owner.
Complexity: Choosing::land rose 19 → 20 through an added condition on the existing probe-reset branch. Gate decisions remain at the existing owner.
Silent failure: 2 unread-rate paths followed through the record writer; absent readings remain None and print -. Invalid walls and probabilities retain named errors.
Tests, static mutation review: restoring the early reset at width.rs:1641 breaks the losing-probe row assertion; dropping the held-median check at line 1233 breaks the stale-median assertions. Replacing gate_rate with mean-profile rate at width.rs:1135 breaks the diagnostic-rate assertion. Omitting either field in record.rs:3387 breaks the record assertions.
Gates: no tolerance, threshold, lint level or test was removed or relaxed. FAIL-first output is supplied for the new runtime tests; no PIN moved.
Adversarial checks: a slower probe cannot promote the stale median while its replacement warms; truncated proposals stay bounded by the returned length; interrupted flights are discarded; zero-width diagnostic reads avoid the drafted-rate path.
Escape catalog: C1–C4 have no matches. The added recipe preserves failures through &&.
Notes
Tests and mutation effects were reviewed statically; builds and hardware runs were not repeated.
Card check: needs-gpu. This pull request changes crates/gpu-gates/src/record.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. |
MTP 폭 gate가 손해인 넓은 chain probe에 연속 4번의 verify를 강제하던 결함을 고치고, 진단 줄에 폭별 gate 비율과 id당 walk 비용을 추가합니다.
What and why
With a chain draft (MTP) under
BLOOMERY_MTP_WIDTH=cost, a probe of a width past the open gate restarted that width's cost readings at every probe. The width then ran until it heldmin_timingsreadings again, so a probe that loses still forced four verify steps in a row. A probe now refreshes the means of the positions past the gate, as before, and restarts its cost readings only when the refreshed profile would move the gate at the held median or at the new reading. A losing probe is one verify step. The held median alone cannot move the gate against a new, slower wall.The
mtp width,mtp summaryanddraft summarylines now also print the gate rate of each width on the recent windows (rates=) and the estimated walk of one id (walk_ms=), so the chooser's decision can be read from the log. The five checked-in schemas and their docs follow the new lines.The change is in the host chooser (
crates/runtime/src/width.rs) and the record writer (crates/gpu-gates/src/record.rs). No kernel changes.The end-to-end A/B below shows no speed change; the change removes forced verify steps and adds diagnostics, and it claims no speed-up.
Release notes: Fixed: a losing chain probe under the MTP width chooser runs one verify step instead of four, and the width diagnostics report the gate rates and the per-id walk cost.
Code shape
gate_rate; the diagnostics call it instead of copying its arithmetic.start_overcall in the probe path is removed; the module doc describes the new rule.-, as before; nothing is defaulted.cargo fmtandcargo clippyare clean on what I touched; the lint count did not go up.Duplication found or removed (
path:line), or "none": none.What I ran
Unit tests, before and after. The two new tests were added first and run against the old code:
cargo test -p bloomery-runtime width::tests::Head
ee7593632f11f368d1e335c74ebaa5a2b6909858(tests added, old chooser):A third case, a refreshed profile that pays at the held median but loses at the new wall, hit this assertion on
edfcc20b398b7cd7a56229bea04f3ea189c62c9ebefore its fix:Head
b1ee5a59870321a13430c2347c3c217b6b84c147:The record writer's test, on a GeForce RTX 5090. Its first run on
b1ee5a598stopped on the expected line, which lacked the CSV brackets; the last commit fixes the test expectation:Serve gate on the same GeForce RTX 5090 at
c42284d35e496055d23432a6ca2c885a0afca036, the Qwen3 fixture, lookup arm (the arm that reaches the common chooser and its cost mode):Real chain MTP on an NVIDIA GB10 (driver 595.84, CUDA 13.3), base
4c549a477835d471929aa3c04718062488864d3bagainst headc42284d35e496055d23432a6ca2c885a0afca036, onebloomery-serveper revision with the MTP draft read from the same checkpoint folder. Modelnvidia/Qwen3.8-Flash-Next-FP4-Localat revisionb9ce18a6887e18c089fdea8509a33e63429a3300. Prompt 4096 ids, 128 generated tokens, 8 windows, one request at a time, three rounds per revision after a warm-up, run in the order base, head, head, base, base, head:env -u BLOOMERY_MTP_DRAFT BLOOMERY_DRAFT=mtp BLOOMERY_HOST_ROOM=96G BLOOMERY_MTP_WIDTH=cost ./head/target/release/bloomery-serve -m "${MODEL_FP4L}" --host 127.0.0.1 --port 18731 --parallel 1 --ctx-size 16896Greedy output was equal on every request. Every difference is inside the run's spread, so the A/B shows no speed change in either direction.
The new fields on a real run, from a head server log:
AI help
AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.