Repository navigation
placement, model, gpu, gpu-glm5next, gpu-gates: glm5next's card leg runs its routed stacks by its arms, NVFP4 in its planes and the 32-value downs included; the leg's buffers hold the forms its layers' downs read - #651
Conversation
There was a problem hiding this comment.
Verdict: CLEAN: No must-fix defect found in the changed code.
Checked
Duplicates: 32 new or moved items checked; no new duplicate owner found. Dryer reported zero pairs. GPU and gate code were also searched manually.
Complexity: new hostless (36) and hostless_fixture (23) contain fixture construction and assertion conjunctions, with fixture/open/check stages separated. run (47→54) adds clause dispatch. load_placed, forced_row, structure, CardExperts::new, front, and PromptProgram::route add hostless or form-selection branches.
Silent failure: 8 optional/default/skip paths followed to consumers. Missing forms and unsupported stacks produce named errors. Hostless diagnostic zeros represent an absent host sum.
Tests, static mutation review: wrong act_h.of(form) selection fails both hardware oracles; dropping + b32 fails buffer-byte assertions; omitting the 32-value form from card_leg_forms fails reserve assertions; deleting refuse_off_tier(machine)? fails the TierLeg assertion. Removing || host.route_trace fails the host-view check; unconditional row_enqueued(l, 0) times out. Missing NVFP4/IQ3_S arms or widened Qwen arms fail type/coverage assertions. Restoring hostless go/wait operations fails graph counts. Carding Q6_K fails Solar's existing placement checks.
Gates: graph-count and GLM coverage changes have dated PIN reasons. No tolerance was relaxed or test removed. Hardware tests retain their ignored hw_ entries.
Adversarial checks: mixed down forms, noncontiguous host layers, trace retention, forced rows, and grouped prompt service traced through their guards and consumers. Decode/prefill changes introduce no per-token allocation or new synchronization. Hostless layers remove two graph memory-operation nodes; the base contract classifies this as launch count only.
Escape catalog: C1–C4 do not match the changed code.
Notes
Dryer did not scan crates/gpu or crates/gpu-gates; those paths were searched manually.
The pasted GPU runs omit the base commit hash required by CONTRIBUTING.md, so gpu.json records incomplete evidence. GPU tests were not rerun here.
Card check: needs-gpu. This pull request changes crates/gpu-gates/src/bin/gate_glm5next_e2e.rs, crates/gpu-gates/src/bin/gate_glm5next_residency.rs, crates/gpu-gates/src/bin/shared/routed_legs.rs … and carries no gate run on a card (CONTRIBUTING's evidence list); a maintainer adds gpu-verified after one.
Not approved: a release freeze is on (#648), and a merge of a needs-gpu change now would change the tree under the release batch.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
Filed outside this PR: #653
0ad4c83 to
e9c70b3
Compare
There was a problem hiding this comment.
Verdict: CLEAN: No must-fix defect was established in the changed paths.
Checked
Duplicates: 32 added declarations checked; no new duplicate owner. Dryer reported zero pairs.
Complexity: New hostless (36) divides into NVFP4 execution and Q4_K trace checks; hostless_fixture (23) divides into metadata and tensor construction. run (47→54) adds dispatch arms. load_placed, forced_row, structure, CardExperts::new, front and PromptProgram::route add form or hostless branches.
Silent failure: 10 skip, fallback and zero-result sites followed. Unsupported forms and tier combinations return named errors; omitted host sums belong to fully resident layers.
Tests, static mutation audit: omitting the second form at crates/gpu/src/card_leg.rs:191 fails the NVFP4, multi-column and byte-count tests. Removing the prompt leg term at crates/model/src/arch/glm5next/place.rs:342 fails the reserve test; dropping the refusal at line 657 fails the tier test. Removing NVFP4 from crates/placement/src/accepts.rs:428 fails the GLM arm test; restoring the old coverage rule at crates/model/src/arch/coverage.rs:1575 fails the coverage test. Dropping the GEMM condition at crates/placement/src/accepts.rs:297 fails the Qwen arm test. Changing one family's arm at crates/placement/src/accepts.rs:432 fails the common-arm assertions; admitting Q6_K there fails Solar's placement assertions. Restoring host service or dropping the copy at crates/gpu-glm5next/src/ffn.rs:1052 fails the hostless clause; restoring the unconditional serve at crates/gpu-glm5next/src/forced.rs:139 fails its forced-row clause.
Gates: graph-count and NVFP4 coverage changes have dated PIN reasons. No tolerance moved.
Performance: decode and prefill checked. Fully resident decode layers remove two host memory operations; no new per-token allocation was found. PTX identity evidence is supplied for an earlier revision.
Adversarial cases: mixed down forms, absent host views, late trace/residency attachment, NextN drafts and invalid router values were checked against their guards.
Escape catalog: no C1–C4 pattern matched.
Notes
Dryer excluded gpu and gpu-gates; those paths were checked manually. GPU tests were not run in this review.
The GPU evidence omits the base commit hash and reports runs on earlier heads, so gpu.json records evidence=false.
Card check: needs-gpu. This pull request changes crates/gpu-gates/src/bin/gate_glm5next_e2e.rs, crates/gpu-gates/src/bin/gate_glm5next_residency.rs, crates/gpu-gates/src/bin/shared/routed_legs.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: #654
e9c70b3 to
c7fecd1
Compare
There was a problem hiding this comment.
Verdict: CLEAN: carried from e9c70b3e, not re-reviewed.
The approval of e9c70b3e stands for c7fecd13. This pull request's 3 commits are the same patches in the same order: git patch-id --verbatim (the changed lines, the lines around them and whitespace) and the subject are equal for every commit. That review ran under the reviewer instructions, tools and slag ledger that review this head, and it approved.
The base moved, and changed none of the files this pull request changes.
A carry covers each patch's own lines and the lines around them. What the base changed elsewhere is covered by CI on this head and by the landing gates.
Card check: needs-gpu. This pull request changes crates/gpu-gates/src/bin/gate_glm5next_e2e.rs, crates/gpu-gates/src/bin/gate_glm5next_residency.rs, crates/gpu-gates/src/bin/shared/routed_legs.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)
…uns its routed stacks by its arms, NVFP4 in its planes and the 32-value downs included; the leg's buffers hold the forms its layers' downs read
c7fecd1 to
7b8b181
Compare
There was a problem hiding this comment.
Since the last review: no earlier must-fix or non-blocking items were open.
Verdict: CLEAN: Both interdiff edits preserve behavior.
Checked
Duplicates: 0 new definitions in the interdiff; dryer reported 0 pairs.
Complexity: crapper's hostless, hostless_fixture, run, load_placed, forced_row, structure, CardExperts::new, front and route reports concern previously reviewed patches. The interdiff adds no branches.
Silent failure: 0 new sites. Hostless fronts, backs and enqueue notices still bypass the host exchange.
Tests: no test edits in the interdiff. Source inspection confirms that the step scheduler emits no Serve entries and GLM uses StepLeg. Removing the host_leg override therefore leaves decode, verify and slot walks unchanged. No build or hardware gate was run.
Gates: no pins, thresholds or cases changed in the interdiff. Both dense coverage rows retain the dense_by_name import.
Adversarial check: dense leading layers followed by hostless routed layers in a multi-row step still issue no scheduler serve; the routed back also skips row_enqueued for hostless layers.
Escape catalog: no matching patterns. No ledger lessons are in force.
Notes
The PR includes card output and gate results for earlier branch revisions but omits the tested base commit hash. The GPU evidence list is incomplete.
Card check: needs-gpu. This pull request changes crates/gpu-gates/src/bin/gate_glm5next_e2e.rs, crates/gpu-gates/src/bin/gate_glm5next_residency.rs, crates/gpu-gates/src/bin/shared/routed_legs.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. |
GLM-5.3-Flash의 카드 leg가 routed expert stack을 arm 표대로 돌리게 하고, leg buffer가 층의 down이 읽는 형식을 담게 합니다.
Part of #565. Builds on #629 and #640.
What and why
GLM-5.3-Flash's card leg now runs its routed expert stacks through the arm table that #629 and #640 set up for the other models (
leg_arms,LegStacks::of_arms,routed_rule). Its arm adds NVFP4 in its planes and both down forms: the 128-valueQ8Actand the 32-valueQ8Blocks32. A Q6_K down still runs on the host.The diff is 29 files, +1103/-427. It has six parts:
leg_arms(Glm5nextBody)androuted_rule(Glm5nextBody)name the same set, and plan and load both read it.card_stacksingpu-glm5next/src/ffn.rsbuilds the stacks withLegStacks::of_arms, so the GLMCardStacks,Stackandunrunare gone. The Qwen3.8 arms are now written on the sameplanes_leg_*functions. Their set is main's plus IQ3_S gate and up stacks: the rule admits a gate and up type whose prompt GEMM the table names, and gemm: an IQ3_S grouped prompt GEMM (gemm_iq3s), so IQ3_S expert stacks reach the card leg #645 added the IQ3_S one. Qwen3.8's card leg runs the sameCardLeglaunches thatgate-gpu-qwen35moe-legcovers for IQ3_S.Q8Act) with NVFP4, Q5_1, Q8_0 and IQ4_NL layers (Q8Blocks32). The card rows and rank rows hold the forms of the carded layers, and the prompt buffer holds only the forms of layers whose tile does not run. Each run picks the form its down entry reads. A form the buffers do not hold is a namedGpuError::Shape.kernels::leg_bytes(withq8_blocks32_bytesandDownForms) counts the leg's buffers. The card leg, the relu2 leg,workstation::tier_chunk_scratch_bytesand GLM'scard_leg_bytesall read it. A load whose layers are all NVFP4 no longer reserves the 413,696 BQ8Actcolumn buffer, and a K-quant-only load no longer reserves the 163,840 B 32-value column buffer.PlaceError::TierLeg.place_hybrid::card_routedand the re-exports in mimo2, raon1, solar2, minimaxm3 and glm5next each carried is nowaccepts::common_leg_card(private, read byrouted_rule). Inrouted_legs.rs,outcome_byreads a wrapped placement refusal by name, so the gate no longer scores it as a failure.BLOOMERY_ROUTE_TRACE), keeps the host leg, because the host service serves swaps and writes the trace. The per-layer diagnosticBody::forced_rowfollows the same rule: on a fully resident layer it serves no host row and reports a zero host sum.Coverage still uses the per-program type union, as main does. TP code is unchanged, and the rank leg uses
of_rankwith the form-set buffers.gate-gpu-glm5next-tppasses for 1 and 2 ranks.I did not time this change, so it carries no speed claim. That includes the hostless path in part 6, which removes two graph memory operations per fully resident layer.
_sellaunchesThe NVFP4 arms run as their
_sellaunches and the K-quant and Q8_0 arms run as theirs, as the 13 passing card-leg tests check.Release notes: Added: GLM-5.3-Flash's card leg runs NVFP4 and 32-value down stacks, and the leg's buffers are sized by the forms of the layers it runs.
Code shape
kernels::leg_bytes. The GLMCardStacks,place_hybrid::card_routedwith its re-exports, mimo2'splace_gateand thecard_leg.rscopies ofq8_blocks32_bytesand the byte formula are gone.crates/gpu/src/model/fit.rs:41act_col_bytes(k)is an older copy ofkernels::q8_act_bytes(1, k)that this change leaves in place.matcharm beside the other programs inaccepts.rs, and the buffers and the byte formula are common.common_leg_cardandcard_leg_formsare private.cargo fmtis clean on this tree.cargo clippywas not run on this head, so the lint count is unchecked.Duplication found or removed (
path:line):crates/placement/src/accepts.rs:309andcrates/placement/src/kernels.rs:39look alike but differ:kernels::upis the entry for a stack with no gate, andqwen38_downadds the Qwen3.8 arm and the prompt GEMM condition over the same 32-value form.crates/placement/src/kernels.rs:115andcrates/placement/src/kernels.rs:101count different layouts: the 32-value form has256 * ceil(k/32/32)code words per column plus a sum and a scale per block, and the 128-value form has five permutation planes.What I ran
The GLM fixture gate, the card-leg hardware tests, the GLM model tests and the PTX comparison ran on
f8cb0fbc. The PR head is that tree on current main plus three changes:forced_rowserves no host row on a fully resident layer, the Qwen3.8 arm test lists IQ3_S, and the gate fixture names its architecture key by the shared constant. Main's changes in between share one file with this branch,crates/model/src/arch/coverage.rs, where they touch only the Nemotron rows. Thehostlessclause ran again on18cb411b, the same commits before the last rebase onto main. The TP gate, the routed-legs A/B, the Qwen3.6 leg gate, the host test sweep and t0 ran on earlier revisions of this branch. The later revisions are rebases onto current main and the hostless path of part 6, which changes nothing for a layer that keeps its host leg: the PTX comparison against main is identical.GLM fixture gate on a DGX Spark. The decode graph has 172 nodes, and the card holds 163, 163 and 162 experts on its three routed layers. The new
hostlessclause opens a synthetic one-layer trunk with all 288 routed experts on the card and nonzero weights, once as NVFP4 and once as Q4_K. The NVFP4 load holds no host view and its eager, graph and batched prompt paths agree. The Q4_K load for a route trace keeps its host views and gives the same logits as the hostless load:With the trace condition removed from the load's keep flag, the route-trace load drops its host leg and the clause fails; with host views built for every layer, the NVFP4 load fails on the host union:
On
18cb411b, thehostlessclause also runs a forced row of the NVFP4 layer: the host sum is zero and the block output equals the card sum plus the shared expert's. Withforced_rowserving the host row unconditionally, the row waits for a host go that never comes and the gate fails:PTX comparison against main on
f8cb0fbc(just canon-check):GLM model tests on
f8cb0fbc(cargo test -p bloomery-model --lib arch::glm5next):test result: ok. 37 passed; 0 failed.Two-rank GLM gate on the second DGX Spark, with 4 ranks refused by name because the fixture's 512 rows do not split into whole 256-value blocks:
Card-leg hardware tests on a DGX Spark (
cargo test -p bloomery-gpu --lib card_leg::through the gate runner):Qwen3.6 placed leg gate on an RTX 5090 machine (the Qwen3.6 default fixture):
just gate-gpu-routed-legsover the GLM UD-Q4_K_XL file on a DGX Spark, alternating main and this branch (main, head, head, main). All four runs pass, and each places 39 of 42 routed layers on the card:Host tests and checks on an earlier revision of this branch, on a DGX Spark:
just contrib-check --tier t0on an RTX 5090 machine:With one rule reverted at a time, its unit test goes red:
On a DGX Spark, a leg that builds one form when two are requested turns 3 card-leg hardware tests red, for example "reads Q8Blocks32 columns, which the buffers do not hold".
GPU Evidence
nvidia-smion the DGX Spark (GB10) the GLM gates ran on:On the RTX 5090 machine:
What I ran into
This does not block the PR.
just gate-gpu-qwen35moe-legran on the default fixture only. The four fixture variants (q35iq4xs, q35q80, q35iq4q8, q35q6k) are not on any test machine, so they did not run. The card-leg hardware tests cover the Q8_0 and Q6_K gate-up and the 32-value down paths against the_sellaunches.The Qwen3-30B placed gate (
gate_qwen3moe_e2e) did not run because its fixture is not on any test machine. The common leg it uses is covered by the card-leg tests and the Qwen3.6 placed run above.No real NVFP4 GLM file is on a test machine. The NVFP4 layers are covered by the synthetic hostless trunk in the e2e gate, the card-leg tests and the plan tests.
One
just gate-gpu-routed-legsrun failed on the planner's unified pool check for the GLM UD-Q4_K_XL file, with the pool passed by 31 to 44 MB:That run chose a seat context of 262144 where the passing runs used 4096. The routed stacks in that file are Q4_K, Q5_K and Q6_K, where the GLM rule equals the common rule, so main and this branch give the planner the same input. Four alternating runs on one machine all passed. The planner reads free card bytes at run time, which looks like the source of the difference.
cargo clippywas not run on this head.Hardware
Two DGX Sparks (GB10, driver 595.84) for the GLM, card-leg and placement runs, and an RTX 5090 machine (driver 595.99.02) for the Qwen3.6 placed leg gate and the t0 check.
AI help
AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.