Skip to content

Distributed functions - #141

Merged
andresy merged 2 commits into
mainfrom
distributed-functions
Oct 26, 2026
Merged

andresy merged 2 commits into
mainfrom
distributed-functions

Conversation

@andresy

@andresy andresy commented Oct 24, 2026

Copy link
Copy Markdown
Member

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() with get_rank()/get_size()
- Branch on dtor at construction time (matches closure_generator.py)

ronaldmannak and others added 2 commits October 13, 2026 17:57
- 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
@andresy
andresy merged commit 19d3c9c into main Oct 26, 2026
@andresy
andresy deleted the distributed-functions branch October 26, 2026 15:58
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.

3 participants