Skip to content

build: pin mlx and mlx-c to the JACCL fixes and the owned bootstrap bridge - #54

Draft
jonathan308 wants to merge 3 commits into
mainfrom
darkbloom/jaccl-fixes-pin
Draft

jonathan308 wants to merge 3 commits into
mainfrom
darkbloom/jaccl-fixes-pin

Conversation

@jonathan308

@jonathan308 jonathan308 commented Oct 9, 2026 •

Copy link
Copy Markdown

Summary

Two pin moves on current main (6923a80f) that bring the two-Mac (JACCL, RDMA over Thunderbolt) fixes into the Swift stack.

Commit Path From To Source
0656737 Source/Cmlx/mlx cb77239b (fork main) d0f8b0a8 Layr-Labs/mlx#33, every source and test change. The one later commit there only reformats a test CMake file
27ca572 Source/Cmlx/mlx-c and the two mirrored copies of distributed_group.h 02cf6f4d 489e9654 head of Layr-Labs/mlx-c#14

Status: draft. Both pins are heads of draft branches. They must move to the merged commits before this is merged. Order: Layr-Labs/mlx#33 and Layr-Labs/mlx-c#14 first, then this PR, then the pin of libs/mlx-swift and libs/mlx in Layr-Labs/d-inference#1407.

This PR contains and extends #33. #33 has the same mlx-c pin and the same two header copies on an older base (0f4fe403), and pins mlx to the send-frame commit alone on an older mlx base, which is behind the mlx that main pins now. #33 can be closed when this one is accepted.

What the mlx pin brings (0656737)

  • Upstream JACCL and distributed fixes: the ring all_gather slice (ml-explore/mlx#4443), the ReduceScatter::eval_cpu assertion (ml-explore/mlx#4557), and a failed backend initialization that was cached (ml-explore/mlx#4558).
  • The unused tail of each JACCL send frame is set to zero (Gajesh Naik's commit of Preserve JACCL scratch-frame clearing from the cluster workspace mlx#26).
  • A progress guard. A JACCL call that gets no completion for longer than JACCL_PROGRESS_TIMEOUT_MS (default 120000) fails with an error and closes its group. Before, a rank whose peer had died polled at 100% CPU with no limit.
  • The queue pair sends from the GID that was advertised to the peer.

Nothing else changes between the two mlx commits: no Metal kernel, no mirrored header and no generated source. Source/Cmlx/include, include-framework and mlx-generated are not touched by this commit. The JACCL sources are compiled only for a macOS 26.2 deployment target (mlx-conditional/jaccl_conditional.cpp). Other targets keep the stub.

What the mlx-c pin brings (27ca572)

mlx_distributed_init_jaccl_with_bootstrap: a strict JACCL initialization whose bootstrap exchange goes through a callback of the caller instead of the TCP side channel. One commit by Gajesh Naik on top of the mlx-c commit that main pins.

  • The two mirrored headers are the header of that commit, copied as tools/update-mlx.sh copies them. They are byte-identical to the copies in Preserve Swift Cmlx bootstrap exports and captured dependency pins #33.
  • The new source mlx/c/distributed_bootstrap.cpp is compiled by the existing Cmlx target. Package.swift does not change.
  • xcode/MLX.xcodeproj is not updated.

What was run

Check Result
Two Macs over Thunderbolt RDMA, two-rank mesh, with the three JACCL fix commits before they were moved onto the upstream backports, built through this package for macOS 26.2 Normal traffic exact. A rank whose peer ended reported the timeout at the limit and exited, with and without a model loaded. Neither Mac kept a process or wired memory. Details in Layr-Labs/mlx#33.
Simulated-verbs JACCL tests at mlx d0f8b0a8 8 of 8 CTest tests pass with ASan and UBSan.
mlx/c/distributed_bootstrap.cpp at mlx-c 489e9654 against mlx d0f8b0a8 Syntax check passes.
Header copies Identical to #33.
CI build-and-test on this pull request (swift build --build-tests, default deployment target) distributed_bootstrap.cpp compiles against the pinned mlx. 927 tests run, 0 failures, 1 skipped.

Not shown

  • A build of this package at exactly these two pins for macOS 26.2, where the real JACCL sources are compiled. CI builds the default target, which keeps the stub. The hardware runs used mlx at the three fix commits without the backports, and mlx-c at 02cf6f4d. (The MLX CMake build for 26.2 at this mlx commit passes in JACCL: zeroed send-frame tails, a progress guard, the advertised GID and the upstream JACCL fixes mlx#33.)
  • Any call of mlx_distributed_init_jaccl_with_bootstrap. No caller exists in this repository. The provider side that will call it is not written yet.
  • The Xcode project build.

How AI was used

Claude Code (Anthropic) prepared the two commits, the commit messages and this description, and ran the checks above, at the direction of the account owner, who asked for this draft. The mlx-c commit and the header text are by Gajesh Naik. Nothing is proposed to ml-explore/mlx-swift.

Update 2026-10-10

64070c4 moves Source/Cmlx/mlx to fdae3174 (draft Layr-Labs/mlx#33 head): the 64-bit ring all_gather slice fix, the revert of the NAX quantised-MoE gather_qmm simdgroup skip (upstream c7ff35d97, which lost JACCL completions on a two-Mac pair with one NAX GPU; output unchanged), and guard v2 (30 s progress limit, teardown exit with memory release, status 75). Gitlink only; no source files added or removed. Two-Mac evidence is in the mlx#33 description.

🤖 Generated with Claude Code

jonathan308 and others added 2 commits October 8, 2026 23:12
Moves Source/Cmlx/mlx from cb77239b (fork main) to d0f8b0a8, the head of
Layr-Labs/mlx pull request 33. That branch adds, on fork main:

- upstream JACCL and distributed fixes (ml-explore/mlx #4443, #4557,
  #4558, and the scoped_env test helper of #4474);
- zeroing of the unused tail of each JACCL send frame;
- a progress guard: a JACCL call that gets no completion for longer than
  JACCL_PROGRESS_TIMEOUT_MS (default 120000) fails with an error and
  closes its group, instead of polling forever when the peer has died;
- the queue pair sends from the GID that was advertised to the peer.

The change is in mlx/distributed and the CPU code of one distributed op.
No Metal kernel, no mirrored header and no generated source changes, so
Source/Cmlx/include, include-framework and mlx-generated stay as they
are. The JACCL sources are compiled only for a macOS 26.2 deployment
target (mlx-conditional/jaccl_conditional.cpp); other targets keep the
stub and are not affected.

The pin is the head of a draft branch. It must move to the merged commit
before this change is merged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eader

Moves Source/Cmlx/mlx-c from 02cf6f4d to 489e9654, the head of
Layr-Labs/mlx-c pull request 14 (one commit by Gajesh Naik on top of the
current pin). It adds mlx_distributed_init_jaccl_with_bootstrap: a strict
JACCL initialization whose bootstrap exchange goes through a callback of
the caller instead of the TCP side channel. A provider that already holds
an authenticated channel to its peer can then start the mesh without a
second listener.

The two mirrored copies of mlx/c/distributed_group.h are updated to the
header of that commit, in the way tools/update-mlx.sh copies them. The new
source mlx/c/distributed_bootstrap.cpp is compiled by the existing Cmlx
target; Package.swift does not change. The Xcode project is not updated.

This is the mlx-c half and the header half of Layr-Labs/mlx-swift pull
request 33, on current main. The header copies are identical to the ones
of that pull request.

Checked: distributed_bootstrap.cpp passes a syntax check against mlx at
d0f8b0a8 (the pin of the previous commit). A build of the package at
these two pins was not run yet.

The pin is the head of a draft branch. It must move to the merged commit
before this change is merged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Moves Source/Cmlx/mlx from d0f8b0a8 to fdae3174 on Layr-Labs/mlx
darkbloom/jaccl-send-frame-progress-guard (draft Layr-Labs/mlx#33):

- b7658964: ring all_gather slice arithmetic in 64 bits.
- ccf517a0: revert of the NAX quantised-MoE gather_qmm simdgroup skip
  (upstream ml-explore/mlx c7ff35d97), which lost JACCL all-reduce
  completions on a two-Mac pair with one NAX GPU. Output unchanged.
- fdae3174: 30 s progress limit, teardown exit with a memory release hook
  (status 75) by default, completion queues sized 4x.

No source files were added or removed, so the package manifest is
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant