Preserve SDPA for CoreML#5258
Closed
YifanShenSZ wants to merge 3 commits intopytorch:mainfrom
Closed
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/5258
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit b552716 with merge base de30572 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
d464b45 to
e017e99
Compare
e017e99 to
cbcc3e9
Compare
cccclai
approved these changes
Sep 11, 2024
Contributor
cccclai
left a comment
There was a problem hiding this comment.
Thanks! It’s a a lot cleaner to use custom op. Eventually we can use the new api
Contributor
|
@cccclai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
cccclai
reviewed
Sep 12, 2024
cccclai
reviewed
Sep 12, 2024
cccclai
reviewed
Sep 12, 2024
Contributor
|
@cccclai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
1 similar comment
Contributor
|
@cccclai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Starting from iOS18, CoreML has added SDPA op, so there is no longer need to decompose torch SDPA
Solution
Following #3483, add
ops_not_to_decomposein CoreML partitioner, then useto_edge_transform_and_lowerAPI in llama export