Skip to content

Gh/lucylq/92/head#12612

Closed
lucylq wants to merge 5 commits into
mainfrom
gh/lucylq/92/head
Closed

Gh/lucylq/92/head#12612
lucylq wants to merge 5 commits into
mainfrom
gh/lucylq/92/head

Conversation

@lucylq

@lucylq lucylq commented Jul 17, 2025

Copy link
Copy Markdown
Contributor

Summary

[PLEASE REMOVE] See CONTRIBUTING.md's Pull Requests for ExecuTorch PR guidelines.

[PLEASE REMOVE] If this PR closes an issue, please add a Fixes #<issue-id> line.

[PLEASE REMOVE] If this PR introduces a fix or feature that should be the upcoming release notes, please add a "Release notes: " label. For a list of available release notes labels, check out CONTRIBUTING.md's Pull Requests.

Test plan

[PLEASE REMOVE] How did you test this PR? Please write down any manual commands you used and note down tests that you have written if applicable.

lucylq added 5 commits July 14, 2025 17:35
1. Add `preserve_ops` to `EdgeCompileConfig`
2. Remove preserved ops from the decomposition table in `to_edge`.
3. Add checks to the verifier ensuring that preserved ops do not have mutations or views.
4. Update 'core_aten_exception_list' to be 'preserved_ops' in `to_edge_transform_and_lower`.

Context/Usage
**core_aten_ops_exception_list**
- Contains operators that are missing a decomposition to core aten.
- Exclude these so that verification can still be run on the rest of the graph.
- Ideally, this list should be empty.

**preserve_ops**
- Contains operators that the user specifically does not want decomposed.
- Must be aten; custom ops are ignored by verifier.

Edge case:
- If an aten operator does not have a decomp, and the user specifically wants it to be preserved, put it in preserve_ops rather than core_aten_ops_exception_list.

Differential Revision: [D78298749](https://our.internmc.facebook.com/intern/diff/D78298749/)

[ghstack-poisoned]
Replace with to_edge.

Differential Revision: [D78311705](https://our.internmc.facebook.com/intern/diff/D78311705/)

[ghstack-poisoned]
Experimental API, no stability guarantees. Replaced with to_edge, which now takes in `preserve_ops` in the `EdgeCompileConfig`.

Differential Revision: [D78312326](https://our.internmc.facebook.com/intern/diff/D78312326/)

[ghstack-poisoned]
Experimental API, no stability guarantees. Replaced with to_edge, which now takes in `preserve_ops` in the `EdgeCompileConfig`.

Differential Revision: [D78312326](https://our.internmc.facebook.com/intern/diff/D78312326/)

[ghstack-poisoned]
Experimental API, no stability guarantees. Replaced with to_edge, which now takes in `preserve_ops` in the `EdgeCompileConfig`.

Differential Revision: [D78312326](https://our.internmc.facebook.com/intern/diff/D78312326/)

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Jul 17, 2025

Copy link
Copy Markdown

🔗 Helpful Links

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

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

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 17, 2025
@github-actions

Copy link
Copy Markdown

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.

@lucylq lucylq closed this Jul 17, 2025
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.

1 participant