Repository navigation
Distributed functions - #141
Merged
Merged
Conversation
- Drop includes that are already available transitively via private/mlx.h - Use mlx_error(e.what()) to match the rest of the codebase - Use a named typedef for the all-gather callback - Remove the C-side bk=="jaccl" check; the C++ layer already validates it - Replace deprecated _rank()/_size() with get_rank()/get_size() - Branch on dtor at construction time (matches closure_generator.py) - Keep the detailed doc comment on init_with_all_gather
4 tasks done
davidkoski
approved these changes
Oct 24, 2026
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.
Supersedes #139 (thanks @ronaldmannak for the original work).
Adds the missing distributed functions:
-
mlx_distributed_clear_backends()-
mlx_distributed_init_with_all_gather(...)for JACCL-
mlx_distributed_group_get_rank()/mlx_distributed_group_get_size()Changes from the original commit:
- Drop includes already available via
private/mlx.h- Use
mlx_error(e.what())to match the codebase- Use a named typedef for the all-gather callback
- Remove the C-side
bk=="jaccl"check (the C++ layer validates it)- Replace deprecated
_rank()/_size()withget_rank()/get_size()- Branch on
dtorat construction time (matchesclosure_generator.py)