Skip to content

Sync upstream ml-explore/mlx-swift main (43c90af) - #28

Merged
solderzzc merged 8 commits into
mainfrom
sync/upstream-43c90af-merge
Oct 27, 2026
Merged

solderzzc merged 8 commits into
mainfrom
sync/upstream-43c90af-merge

Conversation

@solderzzc

Copy link
Copy Markdown
Member

Real merge of upstream main through 43c90af (seven commits after 35c10b4). Replaces the bot PR #27, which stopped at 863ee9f and still referenced the removed cLogSupport framework in release.yml. Here release.yml has no cLogSupport references.

No conflicts. Fork-side device-scope patch in Transforms+Compile.swift is kept.

🤖 Generated with Claude Code

davidkoski and others added 8 commits October 19, 2026 08:55
…l-explore#469)

* compile and vmap can produce Sendable closures from Sendable inputs

- this idea comes from ml-explore/mlx-swift-lm#589 (@aleroot)
- breaking change for compile calls that capture state without using inputs:
* Fix iOS 26.2 launch crash from Logger.isEnabled

* rebase and remove previous logging patch

---------

Co-authored-by: David Koski <[email protected]>
ml-explore#481)

* Add Sendable closures and 3-parameter VJP support to MLXCustomFunction (ml-explore#475)
…plore#498)

GPU.deviceInfo() called MTLCreateSystemDefaultDevice() on every call. In a
command-line process the first such call opens a window server session
(SLSCreateDefaultMetalDevice -> SLSMainDisplayID -> SLSInitialize ->
CGSDisplayInitialize). That step can stall for many seconds.

Select the device the same way as metal::load_device in MLX: the first
device of MTLCopyAllDevices(), else MTLCreateSystemDefaultDevice(). Compute
the value once per process. The public API and the returned fields do not
change.

Co-authored-by: Claude Opus 5.5 <[email protected]>
* MaterializedArray is a Sendable MLXArray

- once an array has been evaluated we can use it as Sendable
- a subtype of MLXArray that is Sendable

- handle MaterializedArray passed as inputs (state) to a compiled function
	- contents are constant by definition so can be discarded and captured normally
	- calling materialize inside transforms
	- tracers inside materialized modules
Brings in the seven upstream commits after 35c10b4: ml-explore#481 (Sendable closures and
3-parameter VJP for MLXCustomFunction), ml-explore#503 (shardedToAllPredicate), ml-explore#494 (iOS
26.2 launch crash from Logger.isEnabled), ml-explore#498 (GPU.deviceInfo device selection),
ml-explore#418 (MaterializedArray is Sendable), ml-explore#505 (tripletLoss fix). The cLogSupport
removal in release.yml comes in with the merge; no fork-side edit was needed.
No conflicts.

Co-Authored-By: Claude Haiku 5.5 <[email protected]>
@solderzzc
solderzzc merged commit d5839e5 into main Oct 27, 2026
9 of 12 checks passed
@solderzzc
solderzzc deleted the sync/upstream-43c90af-merge branch October 28, 2026 18:42
ximyro pushed a commit to ximyro/mlx-swift-lm that referenced this pull request Nov 4, 2026
…verloads

mlx-swift upstream 26d685a (ml-explore/mlx-swift#469) gives the stateless
compile(shapeless:_:) overloads a @sendable body for the [MLXArray], 1-, 2- and
3-input shapes. The four shadows in CompiledTrace.swift then duplicate them,
and GPTOSS.swift:96 and Gemma4Text.swift:32/38 fail with "ambiguous use of
compile(shapeless:_:)" (SharpAI/mlx-swift#28, Downstream Integration Test).

CompiledTraceTests built its unguarded baseline with MLX.compile { capture },
which the @sendable overload now rejects. It uses the inputs:/outputs: form
with no declared state instead; that form takes a non-@sendable body on both
the current fork main and ml-explore#28.

Verified: swift build --build-tests against mlx-swift 9ab0a45 (ml-explore#28 head),
Xcode 26.3, exit 0. CompiledTraceTests need a Metal toolchain and are left to CI.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
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.

7 participants