Skip to content

🔄 Auto-Sync: ml-explore/mlx-swift main (78d3cc1, 4 commit(s)) - #30

Merged
solderzzc merged 6 commits into
mainfrom
bot/upstream-78d3cc1-f5d942c
Oct 29, 2026
Merged

solderzzc merged 6 commits into
mainfrom
bot/upstream-78d3cc1-f5d942c

Conversation

@github-actions

Copy link
Copy Markdown

Automated real merge of ml-explore/mlx-swift main (78d3cc1, 4 commit(s) not yet in this fork) into main. Upstream changes: ml-explore/mlx-swift@392aa34...78d3cc1

Merge this PR with a merge commit ("Create a merge commit"), not squash or rebase. Squashing orphans the upstream commits and the fork commits that downstream repos pin (submodule SHAs).

Upstream commits

  • 78d3cc1 Add a JACCL package trait to opt out of the JACCL backend (#517) (Alessio Pollero)
  • 7ede4fd Fix firstError (#513) (Lukas Zima)
  • 5310622 Support 0.32.4 distributed functions (#512) (Ronald Mannak)
  • 3b4b6db debug CI failure (#514) (David Koski)

Needs a human look

  • Fork-sensitive paths changed by this merge:
    • Package.swift
    • Source/Cmlx/mlx-conditional/jaccl_conditional.cpp
  • Upstream also changed workflow files; the bot does not apply them (the default token cannot push workflow changes), apply by hand if wanted:
    • .github/workflows/pull_request.yml

What was checked

  • Git merged cleanly (no conflicts, no -X ours/theirs); the fork's workflows were restored unchanged.
  • Size: 12 files changed, 404 insertions(+), 100 deletions(-).
  • Syntax: 8 changed Swift file(s) parsed with swiftc 6.2.
  • Not run by the bot: a build, the tests, a Metal toolchain. CI on this PR must be green before merging.

Bot disclosure

Prepared by the upstream-sync GitHub Actions workflow. The workflow never approves, reviews or merges; no human has reviewed this merge yet.

  • I have read this PR description in full and approve it as my own

davidkoski and others added 6 commits October 27, 2026 14:03
fix CI/infra failures -- xcode vs command line tools not matching == bad.  Force the tools to use a consistent SDK.
…#517)

Since ml-explore#502 every macOS build whose SDK ships <infiniband/verbs.h> links
the JACCL distributed backend (RDMA over Thunderbolt 5), and dead
stripping cannot remove it: `distributed::init("any")` reaches
`jaccl::init`, and `MLXDistributed.Group` and the sharded MLXNN layers
keep that path alive. An app that never forms a Thunderbolt cluster has
no way to opt out. On a minimal MLX + MLXNN executable (release,
stripped) the backend costs 1,065,280 bytes, 841 KB of them `__text`.

Add a `JACCL` package trait, enabled by default, so an app can leave it
out with `traits: []`:

- `Package.swift` declares the trait and defines `MLX_USE_JACCL` for
  Cmlx when it is enabled. SwiftPM passes traits to Swift targets only,
  so C++ needs the explicit define.
- `jaccl_conditional.cpp` requires `MLX_USE_JACCL` and compiles the
  `no_jaccl.cpp` stub otherwise.
- `Cmlx.xcconfig` always defines `MLX_USE_JACCL`, so the Xcode project
  and its xcframeworks build as before.
- `install.md` documents the trait and that SwiftPM enables the union of
  the traits that dependents request.

The define follows the `MLX_USE_ACCELERATE` naming.

Default on keeps the behaviour of ml-explore#502. The define states only the
choice; platform and SDK gating stay in `jaccl_conditional.cpp`, so iOS,
tvOS and visionOS keep building the stub whatever the trait. The CMake
build keeps mlx's own JACCL gating.
Automated merge by the upstream-sync workflow. 4 upstream commit(s). Merge with a merge commit, not squash/rebase.
Upstream's JACCL package trait (ml-explore#517) needs tools-version
6.1 or later; the fork manifest was 5.12, so the manifest no longer parsed after
the sync. Keep Swift 5 language mode (what 5.12 implied) via swiftLanguageModes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@solderzzc
solderzzc merged commit de0b43c into main Oct 29, 2026
9 checks passed
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.

5 participants