Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] custom extensions #119

Open
petertsoi opened this issue Aug 1, 2024 · 1 comment
Open

[Feature] custom extensions #119

petertsoi opened this issue Aug 1, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@petertsoi
Copy link

Currently, if I want to write a new custom operation and use it in Swift, I would have to maintain my own fork of MLX. It would be great to be able to bring my own CPU/GPU implementations in my own app but still be able to use them like I can in Python.

@awni awni added the enhancement New feature or request label Aug 1, 2024
@awni
Copy link
Member

awni commented Sep 30, 2024

Probably your best bet for this is to use Metal custom kernels which will be added in #137. We also have custom function (which we will plan to add to MLX Swift) to enable custom transformations (like vjp/jvp/vmap). Combining the two you should be able to do everything you can do with a custom extension (with the exception of custom CPU kernels which we don't have yet).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants