-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[export] fix for duplicate constant lifting #118776
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
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/118776
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 77fc686 with merge base 7c609f0 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This pull request was exported from Phabricator. Differential Revision: D53278161 |
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.
very cool graph builder 😎
This pull request was exported from Phabricator. Differential Revision: D53278161 |
Summary: Whenever we access a constant, we emit a `get_attr` node for it. The `lift_constants_pass` was lifting every `get_attr` node unconditionally, even if the same target was already lifted. This diff fixes that. I also took the liberty of adding some infra to make it easier to unit test passes. GraphBuilder lets you declaratively construct graphs with the right metadata, it's pretty useful for directly inducing the pattern you want to test against. Test Plan: added unit test Reviewed By: khabinov, angelayi Differential Revision: D53278161
This pull request was exported from Phabricator. Differential Revision: D53278161 |
This pull request was exported from Phabricator. Differential Revision: D53278161 |
This pull request was exported from Phabricator. Differential Revision: D53278161 |
This pull request was exported from Phabricator. Differential Revision: D53278161 |
This pull request was exported from Phabricator. Differential Revision: D53278161 |
This pull request was exported from Phabricator. Differential Revision: D53278161 |
This pull request was exported from Phabricator. Differential Revision: D53278161 |
This pull request was exported from Phabricator. Differential Revision: D53278161 |
Summary: Whenever we access a constant, we emit a `get_attr` node for it. The `lift_constants_pass` was lifting every `get_attr` node unconditionally, even if the same target was already lifted. This diff fixes that. I also took the liberty of adding some infra to make it easier to unit test passes. GraphBuilder lets you declaratively construct graphs with the right metadata, it's pretty useful for directly inducing the pattern you want to test against. Test Plan: added unit test Reviewed By: khabinov, angelayi Differential Revision: D53278161
This pull request was exported from Phabricator. Differential Revision: D53278161 |
@pytorchbot merge -f 'Landed internally' (Initiating merge automatically since Phabricator Diff has merged, using force because this PR might not pass merge_rules.json but landed internally) |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Summary: Whenever we access a constant, we emit a `get_attr` node for it. The `lift_constants_pass` was lifting every `get_attr` node unconditionally, even if the same target was already lifted. This diff fixes that. I also took the liberty of adding some infra to make it easier to unit test passes. GraphBuilder lets you declaratively construct graphs with the right metadata, it's pretty useful for directly inducing the pattern you want to test against. Test Plan: added unit test Differential Revision: D53278161 Pull Request resolved: #118776 Approved by: https://github.com/angelayi, https://github.com/titaiwangms
Summary:
Whenever we access a constant, we emit a
get_attr
node for it.The
lift_constants_pass
was lifting everyget_attr
node unconditionally, even if the same target was already lifted. This diff fixes that.I also took the liberty of adding some infra to make it easier to unit test passes. GraphBuilder lets you declaratively construct graphs with the right metadata, it's pretty useful for directly inducing the pattern you want to test against.
Test Plan: added unit test
Differential Revision: D53278161