Repository navigation
tp: an opt-in four-rank ring relay for gathers on a switchless ring (#1971) - #2352
Conversation
I ran it on four GB10s cabled as a switchless ring: two QSFP ports a box, ranks 0-1-2-3 along the cables, no link between 0–2 or 1–3. NCCL 2.30.7, head What doesn't fit
Everything below that says "with items 1 and 2 in place" is the head plus that one line, built locally; it isn't a branch or a pull request. The terms
Same ring, same sizes
All-reduce goes to NCCL on both, and its numbers matched within NCCL's own spread. GLM at TP=4Same prompts (
At 128 KiB it sat between 64 and 256 KiB: one stream +2%, four streams equal. Cold prompts are the same everywhere (the 6.13 s was one run). At 16 KiB one stream decodes 2–3% slower than on NCCL alone; I haven't looked at why. So on this ring the relay does what #2352 says once GLM reaches it, and its gain in GLM is about 3% on one stream with a 64 KiB slot. A default slot nearer the break-even would avoid the four-stream loss. |
|
Thank you @Bizuayeu. This is the run we couldn't do ourselves. Exactness held on every rank and in GLM, and the bounded wait named the stopped rank and its sequence within the timeout. The table puts both NCCL runs and the relay side by side, as we asked. We agree with all four, and we'll fix them on this branch:
Each fix gets a host test that fails on |
Yes, I can run it once the fixes are in. One thing before then: on this ring GLM at TP=4 doesn't start without the gather warm-up change from #1971 (#1971 (comment)). Without it, main (
Everything else stays as in my last run: |
|
@Bizuayeu, the four fixes are pushed as
Each fix has a host test that fails on When you have the ring free, could you run the head once, with no local patch: GLM at TP=4 with only |
Done on GLM at TP=4As pushed, GLM doesn't start on this ring. All four ranks stopped in the start-up warm-up within about two minutes, after 26 to 35 With only that warm-up change on top ( Same binary with the wire on and off, two runs each, alternating, on the same prompts and drafts as before:
The greedy
|
|
Thank you, @Bizuayeu. That settles the relay on your ring: the startup line at 64 KiB, decode and one stream 2–3% ahead of NCCL, four streams and cold prompts level, the same The relay stays opt-in, and the warm-up fix it needed to start on your ring is independent of it, so we won't hold this for that PR. We're running our own two-GB10 check now, main against this head with the relay off, to confirm the default path is unchanged. If it is, this goes into the landing queue, and your warm-up PR is welcome whenever its receipts are in. |
0243541 to
615f16c
Compare
|
Our check of the default path is in: GLM-5.3-Flash NVFP4 at TP=2 on two GB10s, main against this head's tree with the relay off, alternated base, new, new, base, plus a chat pass on each.
So the default path is unchanged, and this goes into the landing queue, rebased onto today's main with only the CHANGELOG moved. |
Validate every neighbour before connecting. Carry source half lengths, alternate completed forwards, and retain two-slot custody under the existing sequential producer contract. Keep default mesh and legacy two-rank posts separate, and retain NCCL reductions and exchange. Exercise deferred fake DMA and the shared-memory wire against existing mesh posts over 200000 random collectives, plus live host consumers, bounded named faults, held readers, full decode boundaries and sequence wrap. RDMA qualification remains pending. Refs #1971.
Consumer half flags are not physical HCA stripes. Report a connected neighbour for each HCA and refuse mesh posts on an opted-in relay before any verb.
Pass the relay options through GLM and validate its actual family world before weight loading. Keep a separate configurable 64 KiB relay ceiling so larger gathers stay on NCCL. Omit the two NCCL point-to-point reference types only on verified four-rank verbs rings without opposite links, reporting the reason and comparison count. Add host regressions for the wiring, placement, topology and byte-exact routes.
615f16c to
8e99c51
Compare
|
Merged into main. Thank you, @Bizuayeu: the relay's evidence on a real four-rank switchless ring is all from your runs, the 64 KiB startup line, decode ahead of NCCL, every |
Figures corrected to the PRs' measured ones (#2699 head runs, #2509, #2633, #2436, #2644, #2593, #2430, #2568), scope fixed (#2253, #2287, #2511, #2569, #2337, #2627, #2351, #2626), unsourced figures dropped (#2181, #2606, #2257's pricing clauses), the shipped #2176, #2565, #2548 and gfx12 silu entries and the first #2625 copy removed, and the #2568 and #2352 entries unwrapped to one line each.
The recipe still said gather warms every peer and that there is no switchless RoCE relay. Gather's warm-up is now one all-gather (#2569), ring's touches only its neighbours (#2126), and TF_TP_ROCE_RELAY=1 relays gathers on a four-rank ring with no opposite links (#2352). Add the NCCL settings the ring needs: the engine sets NCCL_CUMEM_ENABLE and NCCL_RUNTIME_CONNECT to 0 when unset (cuda_native.zig:244,247).
The recipe still said gather warms every peer and that there is no switchless RoCE relay. Gather's warm-up is now one all-gather (#2569), ring's touches only its neighbours (#2126), and TF_TP_ROCE_RELAY=1 relays gathers on a four-rank ring with no opposite links (#2352). Add the NCCL settings the ring needs: the engine sets NCCL_CUMEM_ENABLE and NCCL_RUNTIME_CONNECT to 0 when unset (cuda_native.zig:244,247).
Part of #1971, item 2: an opt-in relay in
fabric/tp/roce_multifor a ring of four with no opposite links. Today that ring is refused, and the ranks fall back to NCCL.How it works.
TF_TP_ROCE_RELAY=1is opt-in and requires exactly four ranks.Tests, host only. They run on the in-memory fake ring and the shared-memory wire.
zig fmt --checkpasses, and every file is at 600 lines or under.Not covered. No four-box ring has timed it yet, which is #1971's last item. On two GB10s we'll also run a payload-pattern stress of today's two-rank wire, which checks whether the proxy needs an explicit outer-shareable barrier before posting.
Found along the way, not changed here: main's
reference.reducerounds bf16 after each rank (throughreduceHalf), despite its round-once comment. That's for a separate look.Based on design facts from a public four-GB10 ring engine (blaesus/dsgx10, via Picom-code/pico-dgx-ds4's ring notes), summarised on #1971. This is our own implementation.