Repository navigation
glm/cuda: the other ranks sleep on their lines while rank 0's vision tower runs (for #3614) - #3675
Merged
Merged
Conversation
ultradaoto
added a commit
to ultradaoto/TensorFold
that referenced
this pull request
Nov 17, 2026
ultradaoto
added a commit
to ultradaoto/TensorFold
that referenced
this pull request
Nov 17, 2026
…dds at the top
Open
8 tasks done
Owner
|
Thanks @ultradaoto. LAND with the routine changelog integration. The tower now uses the existing park/wake protocol before its image step, including wake-before-sleep handling. The supplied long-pass regression exercises the original timeout failure. #3660’s workaround should remain historical once this lands.
|
ashhart
pushed a commit
that referenced
this pull request
Nov 19, 2026
ashhart
pushed a commit
that referenced
this pull request
Nov 19, 2026
…tower runs (ashhart#3614) Leader.encode sends the idle step before the tower pass, so ranks 1.. wait in tp_watch.sleep, not in an NCCL broadcast that a net plugin's operation timeout can end (nccl-mesh-plugin: 30 s by default); the image step after the pass wakes them as any step does. One rank and the steps' order are as before.
…dds at the top
ashhart
force-pushed
the
glm-vision-park
branch
from
November 19, 2026 13:27
2beba00 to
34ae8e1
Compare
ashhart
pushed a commit
that referenced
this pull request
Nov 19, 2026
ashhart
pushed a commit
that referenced
this pull request
Nov 19, 2026
ashhart
added a commit
that referenced
this pull request
Nov 19, 2026
Owner
|
Thank you @ultradaoto. 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For #3614, as agreed there: the other ranks leave NCCL for the length of rank 0's tower pass, by the park and wake the engine already uses when no stream is left.
The protocol. Before rank 0's tower encodes a prompt pass's images,
Leader.encodesends the existingidlestep. That is the same stepLeader.idlesends when the last stream ends: every other rank receives it infollow's loop and callstp_watch.sleep, a futex wait on its liveness line, so none of them holds a posted NCCL receive during the pass. After the pass, rank 0's next step (theimagestep, after anydropstepsflushsends) goes throughLeader.send, which seeslink.asleepand callstp_watch.wakefirst, as it does after any idle. The followers return toLink.receiveand the steps go on in the same order.ImageRows,ImageOutOfStep,NoVision, an encode error),encodereturns before sending the image step and the request fails as on main. The other ranks stay asleep until rank 0's next step for any stream, which wakes them first, as after an idle. A cancel lands after the pass, as before. A rank that dies while the others sleep closes its line, and they stop, as they do when it dies while they wait in NCCL.tp_watch.sleepcounts wakes against sleeps, so a wake that arrives before its sleep is not lost.Leader.idledoes nothing on one rank (tp_watch.open()is false) or when the ranks are already asleep.Code:
Leader.encodeincuda_follow.zig(the park, the tower, thenLeader.imagesas before), called fromLanes.imagesincuda_lanes.zigin place of the two calls it made, so that file stays at 599 lines.Leader.idle's comment now names both cases. The tower pass is the only caller ofImages.begin.Checks
On the branch as pushed (aarch64, a GB10, nvcc 13.0):
zig build test-cuda-hostpasses 4,460 of 4,480, with 19 skipped. Its one failure iscli_config_test'sserve --config: expand ..., which fails the same way on main on this host.pr_check: 0 errors, 0 new lean findings.git merge-treeagainst mainf3307fbis clean. Against glm cuda: decode kernels as dependent launches, +6.8% decode at TP=2, same tokens #3673's head, onlyCHANGELOG.mdconflicts: both add a line at the top of Unreleased.The receipts' binary is this commit on main
077998f, built withzig build -Dgpu=spark.Receipts
The test bed:
--parallel 4 --kv-cache fp8 --decode-share 0.5,--drafterincoai/GLM-5.3-Flash-DFlash2, andTF_GLM_DENSE_BITS=8 TF_GLM_HEAD_BITS=8 TF_GLM_KDA_PAD=1 TF_ROCE=1, greedy.NCCL_MESH_TIMEOUT_SEC=30on every rank, the mesh plugin's default. Each rank's log names the 30 s timeout.077998f, this branch, main again. Each was a fresh server with an empty window-cost cache.Images are cold passes with a fresh prompt each time, asking "how many screenshots are attached?". Times are wall seconds to the reply.
Each image pass gave the same answer on all three starts.
The branch alone also ran the passes that stop every rank on main at 30 s (#3614's table). All three ranks were up after each one:
Then a 45-minute soak at four concurrent requests, still at the 30 s default: 1,818 requests, 0 failed, all three ranks up at the end. By kind: