Skip to content

to_edge_transform_and_lower#3483

Closed
tarun292 wants to merge 1 commit intomainfrom
export-D56401086
Closed

to_edge_transform_and_lower#3483
tarun292 wants to merge 1 commit intomainfrom
export-D56401086

Conversation

@tarun292
Copy link
Copy Markdown
Contributor

@tarun292 tarun292 commented May 2, 2024

Summary:
This diff introduces the to_edge_transform_and_lower API. The changes introduces are:

  • Adding support to the Parititioner class to register ops that it doesn't want to be composed
  • Changes to _program.py to add the implementation of to_edge_transform_and_lower()
  • Added a basic test case to test that Linear, SDPA & Linear + SDPA are not decomposed when asked and the corresponding backend consumes them.

Differential Revision: D56401086

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented May 2, 2024

🔗 Helpful Links

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

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

✅ No Failures

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

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

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported labels May 2, 2024
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D56401086

tarun292 added a commit that referenced this pull request May 2, 2024
Summary:
Pull Request resolved: #3483

This diff introduces the to_edge_transform_and_lower API. The changes introduces are:
- Adding support to the Parititioner class to register ops that it doesn't want to be composed
- Changes to _program.py to add the implementation of to_edge_transform_and_lower()
- Added a basic test case to test that Linear, SDPA & Linear + SDPA are not decomposed when asked and the corresponding backend consumes them.

Differential Revision: D56401086
@tarun292 tarun292 force-pushed the export-D56401086 branch from e2312fb to cad09d8 Compare May 2, 2024 16:18
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D56401086

1 similar comment
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D56401086

tarun292 added a commit that referenced this pull request May 2, 2024
Summary:
Pull Request resolved: #3483

This diff introduces the to_edge_transform_and_lower API. The changes introduces are:
- Adding support to the Parititioner class to register ops that it doesn't want to be composed
- Changes to _program.py to add the implementation of to_edge_transform_and_lower()
- Added a basic test case to test that Linear, SDPA & Linear + SDPA are not decomposed when asked and the corresponding backend consumes them.

Differential Revision: D56401086
@tarun292 tarun292 force-pushed the export-D56401086 branch from cad09d8 to 4ec6698 Compare May 2, 2024 16:25
facebook-github-bot pushed a commit that referenced this pull request May 28, 2024
Summary:

This diff introduces the to_edge_transform_and_lower API. The changes introduces are:
- Adding support to the Parititioner class to register ops that it doesn't want to be composed
- Changes to _program.py to add the implementation of to_edge_transform_and_lower()
- Added a basic test case to test that Linear, SDPA & Linear + SDPA are not decomposed when asked and the corresponding backend consumes them.

Reviewed By: kimishpatel, mcr229

Differential Revision: D56401086
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D56401086

tarun292 added a commit that referenced this pull request May 28, 2024
Summary:

This diff introduces the to_edge_transform_and_lower API. The changes introduces are:
- Adding support to the Parititioner class to register ops that it doesn't want to be composed
- Changes to _program.py to add the implementation of to_edge_transform_and_lower()
- Added a basic test case to test that Linear, SDPA & Linear + SDPA are not decomposed when asked and the corresponding backend consumes them.

Reviewed By: kimishpatel, mcr229

Differential Revision: D56401086
@tarun292 tarun292 force-pushed the export-D56401086 branch from a414b5a to 7f2de9b Compare May 28, 2024 15:33
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D56401086

facebook-github-bot pushed a commit that referenced this pull request May 28, 2024
Summary:

This diff introduces the to_edge_transform_and_lower API. The changes introduces are:
- Adding support to the Parititioner class to register ops that it doesn't want to be composed
- Changes to _program.py to add the implementation of to_edge_transform_and_lower()
- Added a basic test case to test that Linear, SDPA & Linear + SDPA are not decomposed when asked and the corresponding backend consumes them.

Reviewed By: kimishpatel, mcr229

Differential Revision: D56401086
Summary:

This diff introduces the to_edge_transform_and_lower API. The changes introduces are:
- Adding support to the Parititioner class to register ops that it doesn't want to be composed
- Changes to _program.py to add the implementation of to_edge_transform_and_lower()
- Added a basic test case to test that Linear, SDPA & Linear + SDPA are not decomposed when asked and the corresponding backend consumes them.

Reviewed By: kimishpatel, mcr229

Differential Revision: D56401086
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D56401086

@tarun292 tarun292 force-pushed the export-D56401086 branch from ae0853e to e83342c Compare May 28, 2024 18:20
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D56401086

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in 2b91eba.

facebook-github-bot pushed a commit that referenced this pull request Sep 12, 2024
Summary:
## 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_decompose` in CoreML partitioner, then use `to_edge_transform_and_lower` API in llama export

Pull Request resolved: #5258

Reviewed By: kirklandsign

Differential Revision: D62550916

Pulled By: cccclai

fbshipit-source-id: bc238a04ea9eb38341157cd2388b7cd17a506bf1
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. fb-exported Merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants