Repository navigation
Sealed all-sum for two-rank tensor parallel (pinned by d-inference#1407) - #35
Draft
jonathan308 wants to merge 1 commit into
Draft
jonathan308 wants to merge 1 commit into
jonathan308 wants to merge 1 commit into
Conversation
…codec-sealed frames) all_sum_sealed(x, group, stream) is evaluated on the CPU stream inside the lazy graph like the native all-sum: the local partial is sealed by a codec the embedding program installs (set_seal_codec: seal, open, context, per-frame overhead), the two frames are all-gathered over the group, the peer's frame is opened (a frame that does not authenticate fails the evaluation; there is no plaintext fallback) and the partials are added in rank order (rank 0 + rank 1) so both ranks hold the same bits. float32, bfloat16, float16; a counter advances per sealed all-sum in evaluation order, identically on both ranks, for the codec's nonces. No codec: the graph refuses to build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Adds a sealed all-sum for two ranks: each rank's partial result crosses the link only as a frame sealed by a codec the caller supplies. Darkbloom's tensor-parallel cluster mode uses it so model activations never cross the Thunderbolt link in the clear.
mlx/distributed/sealed.{h,cpp}: the sealed all-sum primitive and the codec interface.mlx/distributed/primitives.h,CMakeLists.txt: registration and build.Stacked on #33 (JACCL fixes); review that one first. Layr-Labs/d-inference#1407 pins this branch at 535d4e4 through mlx-swift (
darkbloom/sealed-all-sum).Hardware: exercised by the two-Mac tensor-parallel runs recorded on d-inference#1407 (Qwen 3.5 9B and Qwen 3.8 27B).
🤖 Generated with Claude Code