Repository navigation
gpu, qwen38: a pass of one row a slot steps each delta state in place, so its commit replays nothing - #1104
Conversation
…, so its commit replays nothing A pass of several slots ran every delta layer as a verify: each row's update recorded beside the state, then each slot's commit replayed its kept rows into the lane in one eager launch after the readback. A pass whose every slot holds one row is kept whole by every commit (row 0 always; model::slots::kept_whole), so it now writes each slot's state in place as the slot's step does, and its commit settles the waiting verify without the replay. The row counts alone decide, so one capture of the slots and counts still serves step_slots and verify_slots. linear::delta gains gdn_delta_lanes_seqs, gdn_delta_lanes' in-place step over several sequences' stamped lanes after their carries, one launch for every slot as gdn_delta_recovery_seqs is; both entries now share one block body. enqueue_delta_seqs takes a stamped sequence with or without its record, and refuses sequences of two kinds by name. A pass with a slot of several rows (a drafted verify) records as before.
There was a problem hiding this comment.
Verdict: CLEAN: No must-fix defect remains in the reviewed changes; one-row commits retain their row and mixed-row passes retain recovery.
Non-blocking
⚠ Supply the moved entry's codegen proof: crates/gpu/src/linear/delta.rs:1466.
The PR reports a changed PTX hash for gdn_delta_recovery_seqs after extraction. Zero spill and local bytes do not establish the move/split class's program equality.
Attach canonical PTX comparison and equal resource columns for this entry at the reviewed revisions. This separates a body move from a codegen change before merge.
Checked
Duplicates: 6 new or replacement items checked; no duplicate owner found. The dryer pair consists of two entry wrappers sharing lanes_seqs_block.
Complexity: enqueue_delta_seqs 28→35 adds mode validation and a launch arm. Crapper also reports mtp_chain_slots at 17; that definition is outside the supplied diff hunks.
Silent failure: 3 sentinel/default sites followed: empty sequence selection reaches a named table error; absent carry and record select explicit modes. Stamp, lane and numeric faults still reach token readback.
Tests: none added or changed. Existing H2 compares slot ids, logits, state hashes and positions with solo runs. GPU gates and mutations were not executed here.
Gates: no existing tolerance relaxed; the unsafe-count increase has a dated PIN and reason. New spill rows retain zero limits.
Adversarial checks: zero-row keeps are refused; mixed row counts record every slot; captured and eager passes derive their mode from the same row counts; carry positions prevent applying a carry twice.
Escape catalog: none of C1–C4 match the changes.
Notes
The body includes card, model, commit hashes and gate output. Those runs name head db900b6, while the supplied review head is 463bbc4; current-head gate evidence is not included.
Card check: gpu-evidence. This pull request changes crates/gpu/src/arch/qwen3moe/body35_slots.rs, crates/gpu/src/arch/qwen3moe/body38.rs, crates/gpu/src/arch/qwen3moe/program38.rs … and carries a gate run on the author's card, which counts as verified.
🔨 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. |
Qwen3.8에서 슬롯마다 한 행씩 도는 패스가 delta 상태를 제자리에서 갱신하게 해서, 커밋 때 다시 돌리는 replay를 없앴습니다.
What and why
A Qwen3.8 pass over several slots ran every GDN layer as a verify: each row's update went to a record beside the state, and each slot's commit then launched
gdn_delta_recovery_layersto replay the kept rows into the lane. When every slot holds one row, the commit always keeps that row, so the record and the replay carry no information.This change runs such a pass in place.
model::slots::kept_wholenames the rule (every slot holds one row), Body38 skips the record for that pass, and the newgdn_delta_lanes_seqsentry steps each stamped lane directly. A pass with a slot of several rows (an MTP drafted verify) records and replays as before. The timed A/B below shows no gain with ranges apart on every arm that the change reaches, so this PR makes no speed claim.Release notes: Under the hood: a Qwen3.8 pass of one row a slot no longer records and replays its delta state; the commit has nothing left to replay.
Code shape
The review reads these first. A box left unticked needs one line of why.
copying it (
AGENTS.md"Common code first",docs/rust-quality.mdR14). Where I found an existing copy, Inamed it below.
(tensor shapes, the attention kind, the quant). A common owner gained no per-model branch, flag or trait method.
tools/check-comments.sh).PIN(YYYY-MM-DD):and its reason.
cargo fmtandcargo clippyare clean on what I touched; the lint count did not go up.Duplication found or removed (
path:line), or "none": none.linear::delta::enqueue_delta_seqsnow takes a stamped sequence with or without its record and one launch kind per call, and refuses mixed kinds by name.gdn_delta_lanes_seqsandgdn_delta_recovery_seqsshare one block body (lanes_seqs_block::<RECOVERY>,crates/gpu/src/linear/delta.rs); each entry is its launch contract plus one call. Theunsafepin intools/unsafe-ratchet.txtmoves from 2957/404 to 2959/405 for the new entry's block and the sharedunsafe fn, andgdn_delta_lanes_seqshas rows intools/ref/ptx-shapes.tsvand the per-arch tables.What I ran
PR base
990a5ccc8297f632a0e06552ee2a277e23af6fa4, PR headdb900b6732c76756cff3351ecceed9926236c349.Clippy ratchet lint (the aarch64 form of
tools/mac-check.sh lint, run on the PR head):DGX Spark
gdn_delta_recovery_seqschanged only because its body moved into the shared block; its row in the sm_121a table keeps 0 spill and 0 JIT local bytes, and the spill check passes against the pinned rows. The newgdn_delta_lanes_seqsrow also reads 0 spill and 0 JIT local bytes.The slots clauses of
gate_qwen4exp_e2erun the new path (passes of one row a slot against each stream's solo run):RTX 5090 machine
Model:
lmstudio-community/Qwen3.6-35B-A3B-GGUFat revision68a34855558af61cbef0324d31f411be8a506b08,Qwen3.6-35B-A3B-Q4_K_M.gguf, SHA-2564ac6a06bce551257267f49ad2226f8671a22519ccc1a4dde9d5b433d1f2a410d.A/B on GB10 (Qwen3.8, 2 slots)
Model:
nvidia/Qwen3.8-Flash-Next-FP4-Localat revisionb9ce18a6887e18c089fdea8509a33e63429a3300(MODEL_FP4L), SHA-256 of each file:Base is upstream main
39ed53b875a0811cdaf587dd19963da24a650c48, built withcargo oxide build --arch "$(bash tools/arch.sh)" -- -p bloomery-gpu-gates --features glm5next,clef,vision,mimo2,solar2,minimaxm3,flint,gemma-embedding2,hf,checkpoint --release --bin bloomery-serve; the head build uses the same command. Each arm serves with--parallel 2 --ctx-size 16896and takes two concurrent 4096-token prompts with 128 generated tokens, temperature 0.7, seed 42, eight prompt windows (code-fn, andprose-enfor the MTP arm), three rounds per side in the order base, head, head, base, base, head:(The head arms start
./head/target/release/bloomery-servewith the same arguments; the client line repeats at offsets 0, 50000, ... 350000 for each corpus.)Medians of three rounds. The result is no gain and no regression on any arm; the plain arm differences are +1.42% and +1.34% with the ranges apart, and the PR makes no speed claim.
Hardware (if the change is for a machine)
AI help
AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.