Repository navigation
Add Sendable closures and 3-parameter VJP support to MLXCustomFunction - #481
Merged
davidkoski merged 2 commits intoOct 19, 2026
Merged
Conversation
1 task done
Member
|
This needs a swift-format run (the lint failure) |
Contributor
Author
|
Hi @davidkoski, I've run Please take a look when you have a chance! |
davidkoski
force-pushed
the
vjp-sendable-three-params
branch
from
October 19, 2026 15:56
bdc5e3c to
215b4cd
Compare
Member
|
Rebased to main |
davidkoski
approved these changes
Oct 19, 2026
davidkoski
left a comment
Member
There was a problem hiding this comment.
Change looks good, thank you!
8 of 9 tasks
tsnAnh
pushed a commit
to TitoniumLab/mlx-swift
that referenced
this pull request
Nov 7, 2026
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]>
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.
Description
Following discussion on #475:
ForwardandVJPcomponents conform to@Sendable, ensuring custom functions are pure and safe across concurrency contexts.CustomFunctionreturn@Sendable ([MLXArray]) -> [MLXArray].VJP:mlx_closure_custom_new_func_payload) without needing extra C++/Cmlx changes.VJP (_ primals: [MLXArray], _ cotangents: [MLXArray])signature.TransformTestscovering 2-parameter VJP, 3-parameter VJP usingoutputs, and cross-task Sendability.Closes #475