Skip to content

Add ability to add MIL ops to ET that are not yet in coremltools #12648

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

Merged
merged 6 commits into from
Jul 21, 2025

Conversation

metascroy
Copy link
Contributor

This introduces torch_ops.py in ET's CoreML compiler. This lets us add critical MIL ops that are not yet in ET's version of coremltools.

Copy link

pytorch-bot bot commented Jul 18, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/12648

Note: Links to docs will display an error until the docs builds have been completed.

⏳ No Failures, 95 Pending

As of commit d8eb2b6 with merge base 0fbd6d4 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 18, 2025
@metascroy metascroy changed the title Add tmp coreml ops Add ability to add MIL ops to ET that are not yet in coremltools Jul 18, 2025
Copy link

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

Copy link
Collaborator

@YifanShenSZ YifanShenSZ left a comment

Choose a reason for hiding this comment

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

Yes, this great! I'd definitely recommend to add this! This has the potential to go beyond, e.g. to handle custom ops

@metascroy
Copy link
Contributor Author

Can I get a stamp @cccclai? I need someone from PyTorch to approve to merge

@metascroy metascroy force-pushed the add-tmp-coreml-ops branch from b37ff5f to ec79df7 Compare July 21, 2025 16:41
@metascroy metascroy merged commit 6aa864e into main Jul 21, 2025
105 of 106 checks passed
@metascroy metascroy deleted the add-tmp-coreml-ops branch July 21, 2025 18:17
metascroy added a commit that referenced this pull request Jul 21, 2025
This is CoreML support for blockwise/channelwise quantization of
linear/embedding layers using torchao APIs.

This PR is based on top of
#12648, and will be rebased
once that lands to show the changes isolated to quantization.
metascroy added a commit that referenced this pull request Jul 23, 2025
…uantization APIs (#12665)

This switches the ANE model to use to_edge_transform_and_lower and
torchao quantization APIs.

To use to_edge_transform_and_lower, we first need to land:
#12629

To use torchao quant APIs, we first need to land
#12648 and
#12664.

This PR contains all of the changes from those PRs because it is rebased
on them. I will rebase on main once those PRs land to make this easier
to review.
Conarnar pushed a commit to Conarnar/executorch that referenced this pull request Jul 25, 2025
…orch#12648)

This introduces torch_ops.py in ET's CoreML compiler. This lets us add
critical MIL ops that are not yet in ET's version of coremltools.
Conarnar pushed a commit to Conarnar/executorch that referenced this pull request Jul 25, 2025
This is CoreML support for blockwise/channelwise quantization of
linear/embedding layers using torchao APIs.

This PR is based on top of
pytorch#12648, and will be rebased
once that lands to show the changes isolated to quantization.
Conarnar pushed a commit to Conarnar/executorch that referenced this pull request Jul 25, 2025
…uantization APIs (pytorch#12665)

This switches the ANE model to use to_edge_transform_and_lower and
torchao quantization APIs.

To use to_edge_transform_and_lower, we first need to land:
pytorch#12629

To use torchao quant APIs, we first need to land
pytorch#12648 and
pytorch#12664.

This PR contains all of the changes from those PRs because it is rebased
on them. I will rebase on main once those PRs land to make this easier
to review.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants