Skip to content

always partition used static attr #354

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

Closed
wants to merge 4 commits into from

Conversation

mcr229
Copy link
Contributor

@mcr229 mcr229 commented Sep 15, 2023

Summary: For supported_operators that use static data, the data should always be partitioned along with that operator. This is required for adding addmm into supported_operator set because it allows us to partition in the weight and bias data.

Differential Revision: D49129705

@facebook-github-bot facebook-github-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 Sep 15, 2023
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

mcr229 and others added 4 commits September 15, 2023 18:42
Differential Revision: D49068312

fbshipit-source-id: 17a37a8089e5b685aeed0357fb9f8aa2618deb82
Differential Revision: D49301134

fbshipit-source-id: f6b03ff071f9c366f6de9fe3f8e6af1579d69fb6
Differential Revision: D49129704

fbshipit-source-id: 9ef62a2e11b8616b8d0324607112261511837fb6
Summary:
Pull Request resolved: pytorch/executorch#354

This is to enable lowering ViT Model. ViT's Multiheadattention is decomposed to many linears. addmm is not delegateable if it is not derived from torch.nn.linear. There are some addmms in ViT which are derived from MultiHeadAttention. As a result to improve performance we need to partition addmms in the operator list rather than by module. These changes are merged from: D49129703 as both changes are required to keep OD tests working

For supported_operators that use static data, the data should always be partitioned along with that operator. This is required for adding addmm into supported_operator set because it allows us to partition in the weight and bias data.

Differential Revision: D49129705

fbshipit-source-id: 57789f3249cb626c18f313bc86d85d85bb826cfe
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 60ea5c6.

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.

2 participants