Repository navigation
gpu, verbs, levers, gpu-gates: a tier node on another DGX Spark binds its own RDMA end, and Qwen3.8 decodes across two Sparks - #358
Conversation
There was a problem hiding this comment.
Verdict: CLEAN: No reachable behavior failure or proven quality defect survived review.
Optimization headroom
- E. Less work: crates/gpu/src/host/tier.rs:609, remote crossings retain the page's full column capacity during single-column decode. Transfer only the active columns using the existing chain width. For Qwen3.8 with four-column pages, 10 slots, hidden size 2560 and 48 tier layers, the routed-row saving is 4 × 3 × 10 × 2560 × 48 = 14,745,600 bytes/token [derived], before activation savings.
Checked
Duplicates: node.rs:814/885 sends different protocol requests; replacing these short wrappers adds elements.
Complexity: Session::handle adds Bind/reset/release dispatch; measure adds decode planning/readback/reporting. Complexity alone does not establish a defect.
Silent failure: node.rs:1255 reads progress after both bind implementations set the page and layout. Release failures return named errors and retain unsettled work.
Tests: source assertions cover Bind encoding (node.rs:584), endpoint bounds (:607), reset/Bind guards (:1217/:1253/:1262), retention (:1464), release-before-drain (tier.rs:1351), generation bytes (:512), and RDMA/private-IP validation (levers/src/lib.rs:736/:2604). The remote replay test checks Release/reset request counts and recovered token/logit equality. tier-cost.py:110 tests a missing hits_after field. No tests were run during validation.
Gates: no numeric tolerance or lint level moved. The removed private-address rejection has a dated PIN and replacement validation.
Escape catalog: C1–C4 do not apply to the retained advisory. No ledger lessons were in force.
Adversarial checks: malformed endpoints, interrupted resets and failed releases have named refusals. Decode token limits respect the context boundary.
Notes
The PR supplies the card line, hashes and direct binary/tools/gate.sh results, but no just gate-* command with its output. gpu.json therefore records evidence=false. The PR still lists lint and t0 as running.
Card check: needs-gpu. This pull request changes crates/gpu-gates/src/bin/gate_qwen38_nodes.rs, crates/gpu-gates/src/bin/tier_server.rs, crates/gpu-gates/src/generate.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. |
Part of #53 (P5, on the plan in #127).
What and why
With this PR, node 0 (the Spark that runs the stage card and the request) decodes Qwen3.8 while its routed-expert tier lives on a second DGX Spark, node 1, reached over one direct RoCE link. This is the N = 2 run that the P5 row of
docs/contrib/dgx-spark.mdlisted as left. A tier node could only be on the same host before, because both processes mapped one/dev/shmpage andBLOOMERY_TIER_NODEStook loopback addresses only. Now a node at a private IPv4 address binds its own page and RDMA end, and the two ends exchange their endpoints on the existing control channel.In one sitting, the same plan ran with the tier on node 0's own card (A, one Spark) and on node 1's card (B, two Sparks), alternated A1 B1 A2 B2. The output tokens, the full histories with logits and every layer's split are byte-identical across all four runs. A two-Spark token costs 1 control round trip and 48 go/done pairs over RDMA; a go/done pair is one tier layer's handoff from the stage to the tier and back. "Comparison with the reference" below has the match table, and "Qwen3.8 on two DGX Sparks" has the speed.
Release notes: Added: a tier node at a private IPv4 address on another machine serves its expert tier to node 0 over RDMA (
BLOOMERY_TIER_NODESwithBLOOMERY_TIER_LINK=rdma), and Qwen3.8 decodes across two DGX Sparks with the same output as on one.What changes
The three commits each hold one contract.
gpu, verbs: bind a tier node through its own RDMA end(c9d12df1d). An RDMA bind gives each process its own page (Link::remote). Node 0 opens anRdmaEndon the RoCE port whose IPv4 GID matches the control socket's local address (bloomery_verbs::roce_v2_at) and sends its queue pair's endpoint in the Bind request; node 1 replies with its own. Each end carries only its tier's crossings and holds its own page, queue pair and pump. A reset runs in three phases with a control reply after each (stop both ends, reset both writers, then both readers) under a newResettag. A refused replay or a tier drain releases the remote reader's waits first, through a separate non-resettingReleaserequest, so the server is never left waiting on a stream that cannot finish. If the RDMA release cannot settle, the session keeps the work it still owns and returns the error instead of freeing live device buffers. A malformed Bind is refused with a shape error. None of this runs on a successful token: the success path gains no launch, copy, synchronization or request. The protocol version goes from 3 to 4, so a node of the other version is refused by name. A shared-file bind is accepted only on a loopback connection.BLOOMERY_TIER_LINK=loopbackwith a node tier, and an RDMA node page that would also carry a local tier, are refused by name. Node 0 counts the completed control round trips to each tier node.levers, gpu-gates: select private tier nodes from their census(17be6d9a4).BLOOMERY_TIER_NODESandtier_server --listentake loopback or private IPv4 addresses (bloomery_levers::tier_ip). A node off this host requiresBLOOMERY_TIER_LINK=rdma, and the lever is refused by name without it. The control channel still has no authentication; the lever's help text anddocs/contrib/dgx-spark.mdsay it belongs on a trusted network. The docs map (the P5 row, 9.5 and section 10) now describes the RDMA bind and what is left.gpu-gates: compare decode on local and node expert tiers(02e4b73dc).gate_qwen38_nodes --decode0 <gib> <tokens> <out>plans under a fixed card budget, decodes greedily and writes the run to<out>for a byte comparison. It prints the plan's read terms, each tier's go and done wire bytes, the routed hits before and after the timed tokens, the control round trips a token and the go/done pairs a token.TierLayout::wire_bytesgives one row's go and done post bytes, generation words included. Three cards indocs/cards/state what the two-Spark sitting measures:node-decode(control round trips a token),node-link-bytesandnode-small-link(the link's byte and small-message ceilings).What this PR does not do
node-decodeis a profile card: it counts control round trips, and the decode times are reported beside the count.Qwen3.8 on two DGX Sparks
These numbers were measured on
e009f1e3da353019cb890f86321c83f0e45180f8(basece1c310ff39080bd4ef885447737cab426e06ff5) and are carried to this head, not re-measured. The host and verbs source is identical between the two heads, and the later changes add nothing to a successful token (range-diff in the evidence folder). Both arms ran Qwen3.8-Flash-Next UD-Q4_K_XL with a 32-token prompt, context 3072 and a 45 GiB card budget. Each run was a fresh process load, then 32 stepped warm tokens and 64 timed greedy tokens. Arm A is one Spark: one process with the stage and the expert tier on its card (BLOOMERY_TIER_LINK=shared). Arm B is two Sparks: the stage on node 0, the tier on node 1 undertier_server, one process on each card,BLOOMERY_TIER_LINK=rdma. The order was A1 B1 A2 B2 in one sitting undertools/ref/lease-hold.sh --card docs/cards/node-decode.cardon both Sparks.The read ceiling is the plain-read rate a card reached in the same sitting divided by the bytes the plan reads a token. The plan reads 6,373,736,000 B a token [derived]: the serial bytes, each layer's shared bytes and 10 routed experts a layer, from the
decode read termsline. On one Spark, node 0's card reads all of it at its best plain stream read of the sitting, 246.4 GB/s. On two Sparks, the routed hits put 766,321,600 B of each token on node 1 (242.9 GB/s) and 5,607,414,400 B on node 0 [derived], and the slower card sets the ceiling. Both arms reach about half of their ceiling.The card predicted 1 to 4 control round trips a token; the two-Spark runs counted 64 round trips in 64 tokens, and the one-Spark runs 0. Both arms hand off 3072 go/done pairs in 64 tokens, one pair for each of the 48 tier layers; in B these cross the RDMA link. One pair is 41,220 B of go and 409,612 B of done, so a token sends 21,639,936 B [derived]. At B's rate that is 0.48 GB/s [derived], 3.5% of the 13.59 GB/s byte ceiling that
link_probe --size 33554432measured on the same link in the same sitting (one-way p50 2469.03 us) [derived].In all four runs the tier held 12627 experts (39572172800 B), every tier layer was sent a routed slot, and the tier's chains were captured 4 times and replayed 82 times.
Comparison with the reference
The reference is the one-Spark plan of the same build: arm A above, on the measured build
e009f1e3da353019cb890f86321c83f0e45180f8. The same binary, model, budget and plan ran with the tier on node 0's card (A) and on node 1's card over RDMA (B), alternated A1 B1 A2 B2, and after the four runs the sitting compared their files byte for byte.1b44bc645313e239Serving the expert tier from the second DGX Spark changed no output byte: the token streams, the full histories including logits and every layer's split are byte-identical across the four runs.
Code shape
write_file_bind, which the node client, its test andgate_qwen38_nodesshare. The RDMA bind reuses the existingRdmaEnd, androce_v2_atshares one search withfirst_roce_v2.just lint, which reports unused code, is still running.tools/check-comments.shruns in t0, which is still running.--decode0budget range applies to that mode only.cargo fmtandcargo clippyare clean on what I touched; the lint count did not go up.just lintis still running.Duplication found or removed (
path:line), or "none": none.What I ran
The head is
02e4b73d, three commits onupstream/mainb9808a65. The checks below the first table row group markede009f1e3ran on that earlier build of the same three contracts; the refusal and reset checks ran on the final head. Everything ran in thebloomery-dev:cuda13.3.1container on two DGX Sparks.cargo oxide build --arch sm_121 -- -p bloomery-gpu-gates --features gpu --release --bin tier_server --bin gate_qwen38_nodes --bin link_probe, on both SparksTierLayout::wire_byteswithout the generation word, thenBLOOMERY_ARCH=sm_121 bash tools/gate.sh --oxide -p bloomery-gpu --release --lib -- keeps_its_fields_aparttest result: ok. 3 passed; 0 failedBLOOMERY_ARCH=sm_121 bash tools/gate.sh --oxide -p bloomery-gpu --release --lib -- host::tiertest result: ok. 8 passed; 0 failed; 1 ignoredBLOOMERY_ARCH=sm_121 bash tools/gate.sh --oxide -p bloomery-gpu --release --lib -- host::nodetest result: ok. 5 passed; 0 failedtarget/release/gate_qwen38_nodeson the Qwen3.8 fixture, node 1 over loopback as a second process on one Spark (not timed)clauses: 8 ran, 0 left to the real tierandPASSED: gate_qwen38_nodes;98 tokens, 98 logits rows bit for bit the reference'sgate_qwen38_nodes --decode0 45 64underlease-hold.shon both Sparkstools/gate.sh --oxide -p bloomery-gpu --release --lib -- host::tier host::nodeon505548c802e4b73d(two earlier mutants onebf63f2e: no release request and early drain, both rc 101)just lintjust contrib-check --tier t0cargo test -p bloomery-levers, which holds the newremote_nodes_require_private_addresses_and_rdma.To reproduce the sitting, build at this head on both Sparks, then run each arm inside
bash tools/ref/lease-hold.sh --card docs/cards/node-decode.card -- ...on each Spark.<model>isQwen3.8-Flash-Next-UD-Q4_K_XL-00001-of-00004.ggufand<node1>is node 1's RoCE IPv4 address.What I ran into
None of this blocks the PR.
Hardware (if the change is for a machine)
Two DGX Sparks, each reported by
nvidia-smiasNVIDIA GB10, 595.84, 12.1, aarch64 Linux, in thebloomery-dev:cuda13.3.1container. One direct RoCE link joins them (rocep1s0f0on node 0,rocep1s0f1on node 1, RoCE v2 GID index 3). In the same sitting a 64 B message took 3.43 us one way at p50, and a GPU-played full-image round trip took 32.32 us at p50. Plain stream reads were 246.4 and 243.8 GB/s on node 0 and 241.6 and 242.9 GB/s on node 1, before and after the runs. No other GPU process ran before or after, and each phase started after 30 seconds with a load average below 1.AI help
AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.