-
Notifications
You must be signed in to change notification settings - Fork 576
Add pass to tag external constants for delegates #10328
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
Conversation
generate pte+ptd file for a delegated linear example Differential Revision: [D73281924](https://our.internmc.facebook.com/intern/diff/D73281924/) [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/10328
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New FailureAs of commit 6974372 with merge base 334af4a ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
generate pte+ptd file for a delegated linear example Differential Revision: [D73281924](https://our.internmc.facebook.com/intern/diff/D73281924/) ghstack-source-id: 279347167 Pull Request resolved: #10328
This pull request was exported from Phabricator. Differential Revision: D73281924 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the main schema support named data?
@@ -74,3 +76,30 @@ def external_mutable_weights_pass( | |||
node.meta["constant_tag"] = "_default_external_constant" | |||
mutated = True | |||
return PassResult(gm, mutated) | |||
|
|||
|
|||
def xnnpack_external_constants_pass( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this xnnpack specific.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmn, it doesn't have to be xnnpack-specific but I think it has to be delegate-specific; if we use the same tag as portable ('constant_tag'), then constants that are not lowered will be tagged and error out in the emitter. eg. for linear, we have weight, bias and arg0 as constants. weight and bias are lowered, but arg0 makes it through to the emitter and errors out there.
I'm not sure if there will be similar issues with other delegates, as xnnpack will tag arg0 when it isn't lowered, so made it xnnpack-specific to be safe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @mcr229 maybe worthwhile to not tag arg0 (by checking node name for linear/conv) and make the pass more generic?
generate pte+ptd file for a delegated linear example Differential Revision: [D73281924](https://our.internmc.facebook.com/intern/diff/D73281924/) [ghstack-poisoned]
Pull Request resolved: #10328 generate pte+ptd file for a delegated linear example ghstack-source-id: 279382617 Differential Revision: [D73281924](https://our.internmc.facebook.com/intern/diff/D73281924/)
This pull request was exported from Phabricator. Differential Revision: D73281924 |
generate pte+ptd file for a delegated linear example Differential Revision: [D73281924](https://our.internmc.facebook.com/intern/diff/D73281924/) [ghstack-poisoned]
Pull Request resolved: #10328 generate pte+ptd file for a delegated linear example ghstack-source-id: 279396874 Differential Revision: [D73281924](https://our.internmc.facebook.com/intern/diff/D73281924/)
This pull request was exported from Phabricator. Differential Revision: D73281924 |
Yes it does now with weight sharing: https://github.com/pytorch/executorch/blob/main/schema/program.fbs#L437 |
generate pte+ptd file for a delegated linear example Differential Revision: [D73281924](https://our.internmc.facebook.com/intern/diff/D73281924/) [ghstack-poisoned]
Pull Request resolved: #10328 generate pte+ptd file for a delegated linear example ghstack-source-id: 279425325 Differential Revision: [D73281924](https://our.internmc.facebook.com/intern/diff/D73281924/)
This pull request was exported from Phabricator. Differential Revision: D73281924 |
generate pte+ptd file for a delegated linear example Differential Revision: [D73281924](https://our.internmc.facebook.com/intern/diff/D73281924/) [ghstack-poisoned]
Pull Request resolved: #10328 generate pte+ptd file for a delegated linear example ghstack-source-id: 279426784 Differential Revision: [D73281924](https://our.internmc.facebook.com/intern/diff/D73281924/)
This pull request was exported from Phabricator. Differential Revision: D73281924 |
generate pte+ptd file for a delegated linear example Differential Revision: [D73281924](https://our.internmc.facebook.com/intern/diff/D73281924/) [ghstack-poisoned]
Pull Request resolved: #10328 generate pte+ptd file for a delegated linear example ghstack-source-id: 279626429 Differential Revision: [D73281924](https://our.internmc.facebook.com/intern/diff/D73281924/)
This pull request was exported from Phabricator. Differential Revision: D73281924 |
generate pte+ptd file for a delegated linear example Differential Revision: [D73281924](https://our.internmc.facebook.com/intern/diff/D73281924/) [ghstack-poisoned]
Pull Request resolved: #10328 generate pte+ptd file for a delegated linear example ghstack-source-id: 279823594 Differential Revision: [D73281924](https://our.internmc.facebook.com/intern/diff/D73281924/)
This pull request was exported from Phabricator. Differential Revision: D73281924 |
f38dbc3
into
gh/lucylq/63/base
This PR was created by the merge bot to help merge the original PR into the main branch. ghstack PR number: #10328 by @lucylq ^ Please use this as the source of truth for the PR details, comments, and reviews ghstack PR base: https://github.com/pytorch/executorch/tree/gh/lucylq/63/base ghstack PR head: https://github.com/pytorch/executorch/tree/gh/lucylq/63/head Merge bot PR base: https://github.com/pytorch/executorch/tree/main Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/lucylq/63/orig @diff-train-skip-merge Co-authored-by: lucylq <[email protected]>
Stack from ghstack (oldest at bottom):
generate pte+ptd file for a delegated linear example
Differential Revision: D73281924