Repository navigation
fabric/tp: the gather and vote tests join their ranks before returning - #2963
Conversation
|
Thanks @Defilan, this is the right fix and the right size. The It's queued to land once CI finishes on this head.
|
A failed spawn returned while the ranks already started still wrote to the test's frame, the same pattern ashhart#2700 fixed in host.runWith. Both tests now join the ranks they started on every return; in the gather test that also covers rank 0's own steps between the spawns and the join. Every wait in Bootstrap has a deadline, so the join is bounded.
c5f0630 to
1e2b09d
Compare
|
Thank you @Defilan. 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. |
|
Thanks @Defilan! This is in TensorFold 1.2.9, out now: https://github.com/ashhart/TensorFold/releases/tag/v1.2.9
|
What this changes
Before, the three-rank gather test in
bootstrap.zigand the multirank vote test inroce_multi_session.zigreturned from a failed spawn while the ranks they had already started were still running and writing to the test's frame. After, both join the ranks they started before returning. This is the follow-up offered on #2700, for the same patternhost.runWithhad.eab305db0.atc overlap --json(ATC 0.9.6), at 2026-11-12 00:51Z on maineab305db0, after the last rebase: no overlaps and no worktree overlaps, but it reports itself incomplete (otherPullRequestsLimit,pullFilesUnavailable,timeLimit). To cover that, at 00:56Z I read the files of all 271 open pull requests through the REST API: none touchesbootstrap.zigorroce_multi_session.zig.Decisions to check:
acceptOn,broadcast,allGatherandagreeusetrybetween the spawns and the join, so any of them failing also returned with the ranks running. Adeferjoins whatever is still running; the normal path joins before its assertions and sets the count to 0, so nothing is joined twice. If you'd rather keep this to the spawn alone, I'll narrow it.deferso the two tests read alike.Bootstraphas a deadline (5 s per step in these tests), so a rank that lost its peers returns on its own and the join is bounded. A rank thread ends at its first failed step, so a stranded rank waits out at most one deadline, about 5 s. When rank 0 fails afteracceptOn, itsdefer b.close()runs before the deferred join, so the other ranks see the closed connections and return at once.host.runSpawning's. I checked it by hand instead (below). If you want the seam and a test, I'll add them.Checks on this head
c5f063012, on maineab305db0.python3 tools/zig/lean_check.py, on the base and on this head: 345 and 345 bytools/zig/lean_new.py, 0 new.zig build test-tp, each with a fresh local cache so every test is counted: 129 passed, 0 failed, 3 skipped. Maineab305db0: the same 129 and 3.zig build test test-golden -Dcpu=apple_m1on this head: 837/839 steps, 1 failed; it ran the 6,859 tests in the steps that were not cached from earlier runs (6,799 passed, 59 skipped, 1 failed) and took the rest from the cache. Before my rebase, onf8bada0c5(this change on3cacb821c, differing only by two comments), the run counted every test: 12,914 passed, 109 skipped, 1 failed. The one failure is inherited:dashboard_test's "dashboard page polls the public stats snapshot without private details" failed the same way on main3cacb821cwhen I ran it there. The test expects "Paged prefix cache", whichdashboard.htmlhas not had since Dashboard: show prompt-cache hits, entries, last access and disk-tier latency #2655, still true oneab305db0. This branch does not touchzig/src/server/.tp_host_compilebuilds an object without test blocks. I added a throwaway step, not committed, that compiles thetpmodule's tests foraarch64-linux-gnu(b.addTestonmodule(b, linux, ...)): it passes on this head, and a planted type error afterstarted = me;fails it at that line. With the same plant,zig build test-tpandzig build test-roce-multi-hoston the Mac still pass, so this Linux build is what covers the changed lines on a Mac. CI's Linuxzigjob compiles them too.zig fmt --checkon both files andgit diff --check: clean.c5f063012: green. "No GPU" (zig,zig-windows,zig-macos-dev-tools,pytest,release-paths,benchmark-clientson Ubuntu and Windows) and "Zig format" (fmt) pass;host-nightly-linuxandhost-nightly-macosare skipped, because they run only on the nightly schedule.Receipt
n/a: both changes are in
testblocks, and no production code changes, so this cannot reach inference.c5f063012oneab305db0, Zig 0.17.0, an Apple M5 Max on macOS 27.0.1.Checklist