Repository navigation
gpu-gates: the MTP gate's store-behind cuts keep the point they cut to - #776
Conversation
The store-behind clause and the off slot clause take a point at the end of a call without the draft, run one more such call, then cut back to the first call's end. Since 35813e4 a full two-slot ledger keeps its first point, so the second call's point evicted the one the cut needs and the cut was refused before the draft's store condition was reached. The second call now runs without checkpoints, so the cut runs and the clauses check that the draft is forgotten where its store does not reach the point.
There was a problem hiding this comment.
Verdict: CLEAN: Both clauses preserve the rollback checkpoint and retain their draft-store checks.
Checked
Duplicates: 0 new functions, types or constants; existing setters reused; no dryer pairs supplied.
Complexity: Diagnostics report off_slot rising from 14 to 16 through two fallible setter calls in the existing sequence.
Silent failure: The 3 moved or added fallible calls propagate errors with ?. A refused rollback fails the gate.
Tests: Both clauses retain their held == 0 checks. The PR reports both failing when the store-count guard at crates/gpu/src/arch/qwen3moe/body38.rs:2843 is removed. Gate runs were not repeated during validation.
Gates: No band, tolerance, assertion or clause removed or relaxed; no pin moved. Disabling marks preserves existing points. off_slot restores marks before rollback. Reset clears saved points without changing the checkpoint setting.
Performance: Gate orchestration only; no production decode, prefill or kernel change.
Escape catalog: No C1–C4 pattern matched.
Notes
dryer did not run; duplicate checks were manual.
Add both tested commit hashes and the fixture model path to the reported RTX 5090 gate results. GPU evidence remains incomplete under CONTRIBUTING.md.
Card check: needs-gpu. This pull request changes crates/gpu-gates/src/bin/gate_qwen4exp_mtp.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의 두 절(store behind, off slot)이 2-slot checkpoint ledger 때문에 main에서 실패하던 것을, 두 번째 호출이 checkpoint를 찍지 않게 고쳐 통과시킵니다.
What and why
Two clauses of
gate_qwen4exp_mtpdo not get through on main, the store-behind clause and the off-slot clause. Both take a point at the end of a call that runs without the draft, run one more such call, then cut back to the first call's end. The cut should run and forget the draft's store, because the store does not reach that point.The cut never runs. On the fixture the checkpoint ledger holds two slots, and a full ledger keeps the first point it took and evicts the later ones first (
Ledger::takeincrates/runtime/src/seqstate.rs, pinned bymessage_boundaries_keep_the_first_prefix_with_two_slots). The second call's point therefore evicted the point the cut needs, and the cut was refused before the draft's store condition was ever checked. The runtime keeps that order by contract, so the gate's second call must not take a point of its own.The change is in
crates/gpu-gates/src/bin/gate_qwen4exp_mtp.rsonly:store_behindturns checkpoints off before its second call, so the ledger holds the first point and the cut runs. Theset_checkpoints(false)call that followed the cut moved up to sit before that second call.off_slotturns marks off for its second call and back on afterwards, so the continuing call after the cut still runs with checkpoints on.The checks themselves are unchanged: the cut must succeed, the model must stand at the point, and the draft's store must read 0 there. No clause, band or tolerance was removed or relaxed.
Release notes: internal: the MTP gate's store-behind and off-slot clauses cut back to a point the ledger still holds, so they check the draft's store condition again.
Code shape
set_marksandset_checkpointsare reused.?, and thecut.is_ok()check stays.cargo fmtis clean on the changed file (rustfmt --edition 2024 --checkprinted nothing).cargo clippywas not run on this head here.Duplication found or removed (
path:line): none.What I ran
Hardware: one RTX 5090 machine (x86_64 Linux), host mode, fixture tier.
The gate, on main and on this head:
Summary lines, main then this head:
cut back to 85 (refused: ... the checkpoint at 85 was evicted by the host budget)andFAIL, and the off-slot clause stops the gate withthe checkpoint at 41 was evicted by the host budget. The exit code isGATE-RC qwen4exp-mtp=1.cut back to 85 (ran): the draft's store holds 0 at 85 PASS, the off-slot clause reportsslot 0's store 0 after its cutandPASS, and the gate ends withclauses: 28 ran, 4 left to the real tierandGATE-RC qwen4exp-mtp=0.rejoin_row(crates/gpu/src/arch/qwen3moe/body38.rs) changed to ignore the draft's held count, then restored the file. Both clauses fail:the draft's store holds 69 at 85 FAILandslot 0's store 33 after its cut, withMUTANT-RC rejoin-without-store-condition 1. On main this change cannot be told apart from the unmodified code, because the cut is refused first.I added no host test. The two-slot eviction order is already pinned by
message_boundaries_keep_the_first_prefix_with_two_slots, and another test of it would repeat it. The change reorders gate calls only, so it adds no kernel, launch or copy and has no speed measurement.AI help
AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.