Skip to content

glm cuda: a split warm-up that NCCL fails refuses split by name before the rank stops - #2868

Merged
ashhart merged 3 commits into
ashhart:mainfrom
Bizuayeu:pr/glm-split-refuse
Nov 13, 2026
Merged

ashhart merged 3 commits into
ashhart:mainfrom
Bizuayeu:pr/glm-split-refuse

Conversation

@Bizuayeu

@Bizuayeu Bizuayeu commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

With the default TF_GLM_PREFILL_REDUCE=split, GLM's start-up warm-up sends and receives 4 MiB with every other rank (cuda_warm_peers.zig, post), and Engine.init probes split's pairs only after it (ranks.probeStart, #899). On a fabric where some ranks reach only their neighbours, such as the switchless ring of four in the GLM CUDA recipe, the warm-up's group end fails first, and check stops every rank at once through tp_watch.fatal, so the probe's refusal by name is never reached. That was the "not reached" line of my #1971 report (#1971 (comment)): each rank stopped on ncclGroupEnd: unhandled system error, on another rank's stop or on a closed line, and no rank named the setting.

Now, from four ranks, a rank whose split warm-up fails at its group end prints split's refusal before check stops it, naming TF_GLM_PREFILL_REDUCE=gather as the recipe does, and hands check the name REFUSE TF_GLM_PREFILL_REDUCE=split at ncclGroupEnd (50 bytes; tp_watch carries up to 56 to the other ranks). Rank 0 names the refusal whichever rank fails first: the full line when its own group end fails, and rank N stopped (REFUSE TF_GLM_PREFILL_REDUCE=split at ncclGroupEnd) when another rank's fails before it.

Four GB10s at TP=4 on that ring, main against this branch on the same rank settings (the recipe's NCCL lines for the ring), one start each:

Main, split This branch, split This branch, gather
Start every rank stopped after 122 s every rank stopped after 122 s served: health after 78 s, then a greedy chat ("391")
Rank 0 rank 0: rank 2 stopped (ncclGroupEnd); this rank stops too rank 0: rank 1 stopped (REFUSE TF_GLM_PREFILL_REDUCE=split at ncclGroupEnd); this rank stops too no REFUSE
Ranks 1-3 ranks 2 and 3: ncclGroupEnd: unhandled system error (run with NCCL_DEBUG=INFO for details) (2); rank 1: another rank's process ended (its line closed) rank 1: the full refusal below, then REFUSE TF_GLM_PREFILL_REDUCE=split at ncclGroupEnd: unhandled system error (run with NCCL_DEBUG=INFO for details) (2); ranks 2 and 3: another rank's process ended (its line closed) no REFUSE

The full line, as rank 1 printed it:

REFUSE TF_GLM_PREFILL_REDUCE=split: rank 1 could not finish its start-up exchange with every other rank; split sends every rank's rows to every other, and a fabric where some ranks reach only their neighbours (a ring of four without a switch) needs TF_GLM_PREFILL_REDUCE=gather

Which ranks print the full line depends on whose group end returns before another rank's stop reaches it; it differed between runs (ranks 1, 2 and 3 on an earlier head of this branch, then ranks 1 and 3, then rank 1 alone on this change before and after a one-line comment fix). That earlier head printed the full line but handed check the plain ncclGroupEnd, and there rank 0 only said rank 1 stopped (ncclGroupEnd); carrying the refusal in the name is what reaches rank 0.

What else:

  • Below four ranks nothing changes. With two or three ranks every rank is a neighbour, so a failed split warm-up there is not the fabric this line describes, and naming gather would point the wrong way.

  • Ring and gather warm-ups, and every warm-up that finishes, print nothing new and hand check the name they did.

  • probeSplit (cuda_ranks.zig:416) is unchanged; on such a fabric the warm-up fails before it. Its line names ring or gather, while the recipe's "More ranks" section says ring and split don't start on that ring yet (roce_multi on a switchless ring of four: start-up warm-up and the relay #1971), so the new line names gather only.

  • On a switched fabric of four ranks or more, the line can also follow a link fault in split's warm-up. Like the probe's line, it says what split needs and what a neighbours-only fabric needs.

  • Issue: n/a. roce_multi on a switchless ring of four: start-up warm-up and the relay #1971 is closed; this is the refusal its report found unreached (link above).

  • Stacked on: main.

  • atc overlap --json: at 2026-11-11T07:46Z against main 3adaf7868, the 34 open pull requests it lists share only CHANGELOG.md with this one (it marks 5 of them as conflicting there, 5 as clean and 24 as unknown); at 07:08Z, before the CHANGELOG.md commit, it listed none. atc's coverage was incomplete (otherPullRequestsLimit, pullFilesUnavailable, timeLimit), so I also read the file lists of the 238 open pull requests (every file of the 27 with 100 or more), and again those of the 26 updated since: none touches cuda_warm_peers.zig or cuda_warm_peers_test.zig.

Checks on this head

  • Head commit: aa37fe04e, the CHANGELOG.md line with this pull request's number, on c20675dac, the change and the receipt's binary, on main 388efd945. The second commit changes no code. Main has since moved to 6b739dd5e without touching either Zig file, and this head merges into it cleanly.
  • Lean checker, python3 tools/zig/lean_check.py, on the base and on this head: 386 on main and 386 on this head, 0 new. python -I tools/pr_check.py --base origin/main --pr 2868 on this head: 0 errors and 0 warnings (merge base 388efd945, 3 changed files, lean 386 against 386).
  • Tests run, with the command and pass, fail and skip counts (Zig 0.17.0, Linux x86_64 under WSL). On b78cf0056, which differs from c20675dac only by one comment line I shortened for the lean checker:
    • zig build test: 656/659 steps; 8,716 passed, 69 skipped, 3 failed and 1 crashed, all four in one test-cuda-host test binary and all four timing tests: cortheon fuzz's linear-time check, two health_test HTTP exchanges that timed out after 5 s (one aborted on its 5 s quiesce) and benchmark_cli_test's Ctrl-C test, under the full suite's load on six cores. They pass when the step runs alone (below).
    • zig build test-golden (5/5 steps; 55/55 and 322/335 equal to the server goldens, 0 unexpected differences), test-release-version-host (2/2), check-native-cuda-host (7/7 steps) and compile-cuda-tests (10/10 steps, native and -Dtarget=aarch64-linux-gnu): pass. zig fmt --check build.zig zig: clean.
    • The new test, at worlds 2 to 8 and every rank, fails each warm-up's group end and checks that only split refuses, and only from four ranks (a test build keeps the rank in refused_rank instead of printing). Planted: without the refuseSplit call it fails and only it (10 passed, 1 failed); refusing from two ranks, it fails and only it (10 passed, 1 failed); on main it does not compile (refused_rank). The name handed to check cannot be reached by a host test, since in a test build check returns before it uses the name; the ring's rank 0 lines above are its proof.
  • On c20675dac: the lean count above, zig fmt --check and zig ast-check on both changed files (clean), test-glm-warm-peers-host (11/11), zig build test-cuda-host -j2 alone (373/373 steps; 2,044 passed, 6 skipped, 0 failed, the binary with the four above running all 1,282 of its tests again: 1,277 passed, 5 skipped), and git diff --check (clean).
  • CI: on this head, which adds only the CHANGELOG.md line to c20675dac, green: zig, zig-windows, zig-macos-dev-tools, pytest, release-paths, benchmark-clients on Ubuntu and Windows, and Zig format; host-nightly's two jobs skipped. Its first runs were canceled by the repository owner a minute in (07:57Z); closing and reopening this pull request at 10:12Z ran them again. c20675dac's runs were green on the same jobs.
  • Not run, and why: the CUDA runner's GPU tests, since nothing here is a kernel or device code (compile-cuda-tests builds the runner, above). A switched fabric and TP=2 or TP=3 on devices: under Paths below.

Receipt

  • Main against branch: the table above. Each arm was a fresh start of all four ranks in the same containers, one after another, every rank on the same binary; the two split arms differ only by the binary.
  • Boxes it reaches: GLM-5.3-Flash on CUDA, each rank's start-up warm-up (post) with split at four ranks or more, and only when its group end fails. Nothing a prompt pass or a decode round reads changes.
  • New switch? No.
  • Environment, with the TensorFold commit, Zig and backend toolchain, machine and GPU, checkpoint and revision: TensorFold main 388efd945 and this branch's c20675dac, Zig 0.17.0, nvcc 13.3.73 (zig build native -Dsm=121), NCCL 2.30.7, four GB10s (sm_121) at TP=4 on a switchless ring, each box's two QSFP ports cabled to its neighbours, with the recipe's NCCL settings for that ring (NCCL_CUMEM_ENABLE=1, NCCL_RUNTIME_CONNECT=1, NCCL_ALGO=Ring and a graph per rank). Checkpoint Bizuayeu/GLM-5.3-Flash-XSFP4 at 88736f916f8939607fde8a4b881dcae749f7551d.
  • Paths and platforms the change reaches, which I ran and which I could not: GLM-5.3-Flash's CUDA family, every rank's warm-up. Ran: four GB10s at TP=4 on the ring, split on main and on this branch, gather on this branch. Not run: a switched fabric, where the line follows only a failed group end; TP=2 and TP=3 on devices, where the host test shows nothing changes; other CUDA GPUs, since nothing in the change reads the GPU. No other family or backend changes.
  • Exactness, from tools/bench_concurrent.py --alone --serial or token_sha against "draft": false: n/a, the change reads one result at start-up and sets up nothing a pass reads.
  • Main against this branch, same machine and checkpoint, posted before asking for a run on our machines (or why you can't): the table above.
  • Decode speed before and after, from tools/bench_openai.py: n/a, start-up only.
  • Prompt speed before and after: n/a, start-up only.
  • Licence of any new weights or drafter, or "n/a": n/a.

Checklist

  • The title and description match the head commit, including the receipt and the stack.
  • New tests fail before the change, pass after it, and skip cleanly without their dependency (planted without the refusal and from two ranks, the new test fails and only it; it has no dependency to skip on).
  • Comments and docstrings are one line. No measurements or history in the source.
  • No personal data, machine names, internal hosts or local paths in the diff or its commits. No AI attribution lines.
  • Every token still goes through the lane rounds. No serial path, and nothing that needs drafts off (start-up only).
  • Drafted output equals "draft": false, a resumed prompt equals a fresh one, and concurrent equals solo (nothing a pass reads changes).
  • No precision traded for speed. If the bits change, the description says which sums change and why (no sum changes).
  • Decode and prompt processing are no slower than main at one stream and the widest admitted; with --drafter, no slower than without it, greedy and sampled (start-up only).

Bizuayeu added a commit to Bizuayeu/TensorFold that referenced this pull request Nov 11, 2026
@Bizuayeu
Bizuayeu marked this pull request as ready for review November 11, 2026 08:03
@Bizuayeu Bizuayeu closed this Nov 11, 2026
@Bizuayeu Bizuayeu reopened this Nov 11, 2026
@ashhart

ashhart commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Thanks @Bizuayeu, this closes the gap your ring report found neatly. The change touches only the failure path: check returns on success before it reads the name, so a start-up that finishes is unchanged. Two or three ranks, ring and gather print nothing new, and the 50-byte name fits what the rank watch carries, so rank 0 names the refusal whichever rank fails first, as your table shows. The new test covers every world from 2 to 8 and every rank. No asks: main is frozen for today's release, and this is queued to land right after it.

  • Synthena (Ash's Agent)

Bizuayeu and others added 3 commits November 13, 2026 14:09
…e the rank stops

Split's start-up warm-up sends and receives 4 MiB with every other rank, and runs
before Engine.init's split probe, whose refusal names the fix. On a fabric where some
ranks reach only their neighbours (a ring of four without a switch) the warm-up's
group ends with an NCCL error first, and check stops every rank at once, so the
probe's refusal never prints. From four ranks, where a ring has ranks that are not
neighbours, the warm-up now prints that refusal, naming gather, when its group end
fails under split, and hands check a name that starts with it, so a rank that stops
on another rank's failure names the refusal as the cause too. Fewer ranks, ring and
gather warm-ups, and a warm-up that finishes, print nothing new.
@ashhart
ashhart force-pushed the pr/glm-split-refuse branch from aa37fe0 to 722f846 Compare November 13, 2026 15:04
@ashhart
ashhart merged commit 1e8b2c3 into ashhart:main Nov 13, 2026
2 of 10 checks passed
ashhart pushed a commit that referenced this pull request Nov 13, 2026
@ashhart

ashhart commented Nov 13, 2026

Copy link
Copy Markdown
Owner

Thank you @Bizuayeu. This is merged into main with your commits under your own name, so you're listed as a TensorFold contributor. It ships in the next release, credited to you in the changelog and the release notes.

@ashhart

ashhart commented Nov 13, 2026

Copy link
Copy Markdown
Owner

Thanks @Bizuayeu! This is in TensorFold 1.2.8, out now: https://github.com/ashhart/TensorFold/releases/tag/v1.2.8

  • Synthena (Ash's Agent)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants