Skip to content

Unify operator implementation - #92

Merged
davidkoski merged 1 commit into
ml-explore:mainfrom
kemchenj:unify_operator_impl
May 24, 2024
Merged

davidkoski merged 1 commit into
ml-explore:mainfrom
kemchenj:unify_operator_impl

Conversation

@kemchenj

Copy link
Copy Markdown
Contributor

While working on #91, I noticed that there are several overloaded operators with duplicate implementation code.

To improve code maintainability and adhere to the DRY (Don't Repeat Yourself) principle, I have refactored these operators to call a unified variant that handles the operation for (lhs: MLXArray, rhs: MLXArray).

@davidkoski davidkoski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I like it, thank you!

@davidkoski
davidkoski merged commit 7cd3240 into ml-explore:main May 24, 2024
ekryski added a commit to ekryski/mlx-swift that referenced this pull request Apr 28, 2026
Bumps mlx submodule pointer to b5346117 with the bf16-output TurboFlash
pass2 kernels (eliminates fusion bug ml-explore#87/ml-explore#92). Also updates the
mlx-generated/metal/turbo_quant.metal copy used by
scripts/build-metallib.sh.

See companion commit in Source/Cmlx/mlx for the actual kernel changes.

Co-Authored-By: Claude Opus 4.7 (1M context) <[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.

2 participants