[MLX]: Add trunc op handler for mlx backend - #22139
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/22139
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 9030882 with merge base 81969a9 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
Hi @bharath-123! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
|
|
@pytorchbot label "release notes: mlx" |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
46227ca to
bcf449c
Compare
bcf449c to
b5bb8fd
Compare
|
@claude review this PR |
|
Claude finished @metascroy's task in 2m 3s —— View job PR Review: Add trunc op handler for MLX backend
Overall this is a clean, well-scoped change that follows the existing patterns for rounding ops ( Correctness — looks good
Minor issue — likely lint failureIn
These appear unrelated to the trunc change and will likely trip the Lint workflow ( Questions / suggestions (non-blocking)
--- · branch |
b5bb8fd to
9030882
Compare
Summary
Add trunc op handler for the mlx backend. The issue suggested to implement the handler by decomposing it with a floor and ceil op. But I instead chose to implement it via the trunc backend method already available in MLX C++ ops.
Fixes #18923
Test plan
I added a Unary op test and ran the test with:
I have an M3 pro Mac so the MLX backend tests ran with my installed MLX libraries.