Skip to content

add .arrays back to ScaledDotProductAttentionMaskMode#314

Merged
davidkoski merged 1 commit intomainfrom
mlxfastarrays
Dec 9, 2025
Merged

add .arrays back to ScaledDotProductAttentionMaskMode#314
davidkoski merged 1 commit intomainfrom
mlxfastarrays

Conversation

@davidkoski
Copy link
Collaborator

Proposed changes

Please include a description of the problem or feature this PR is addressing. If there is a corresponding issue, include the issue #.

Checklist

Put an x in the boxes that apply.

  • I have read the CONTRIBUTING document
  • I have run pre-commit run --all-files to format my code / installed pre-commit prior to committing changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the necessary documentation (if needed)

- ml-explore/mlx-swift-lm#17
- no longer supported, but we can deprecate and add a runtime check
- keeps source compatibility -- this would have otherwise been tricky to support
@davidkoski davidkoski requested a review from awni December 9, 2025 18:20
case array(MLXArray)

@available(*, deprecated, message: "Use .array instead")
case arrays([MLXArray])
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this downstream (e.g. mlx-swift-lm) could have been compatible with old OR new mlx-swift, but not both.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mlx-c / C++ layer removed the ability to pass multiple arrays, but we can still support the API. None of the mlx-swift-lm code used multiple arrays, but switch statements have to handle all the cases.

Copy link
Member

@awni awni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tx!

@subsriram
Copy link

@davidkoski thanks for addressing this issue. Will this change be merged with main?

@davidkoski davidkoski merged commit 62de22d into main Dec 9, 2025
5 checks passed
@davidkoski davidkoski deleted the mlxfastarrays branch December 9, 2025 23:57
@davidkoski
Copy link
Collaborator Author

Merged ut see #309 -- you may need to restrict it to arm64 builds for Release until we have that fixed (vs main)

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