-
Notifications
You must be signed in to change notification settings - Fork 22.6k
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
remove redundant dynamic_dim #107815
remove redundant dynamic_dim #107815
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/107815
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit 2fa0a8e with merge base 3875563 (): UNSTABLE - The following job failed but was likely due to flakiness present on trunk and has been marked as unstable:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This pull request was exported from Phabricator. Differential Revision: D48618472 |
buf += f"\n```\ndef specify_constraints{str(signature)}:" | ||
buf += f"\n{indent}return [" | ||
print_results( | ||
grouped_dynamic_results, | ||
indent * 2, | ||
lambda result: f"{remove_default_lower_bound(result)},", |
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.
Should remove_default_lower_bound
be deleted then?
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.
OOC, why is remove_default_lower_bound
not called any more?
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.
Moved its functionality upstream.
test/dynamo/test_export.py
Outdated
a = torch.randn(3) | ||
b = torch.randn(3) | ||
with self.assertRaisesRegex( | ||
torch._dynamo.exc.UserError, "\\[\n.*\n.*dynamic_dim.*==.*dynamic_dim.*\n.*\\]" |
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.
Optional nit:
This regex is overly specific, and it can become a "change detector". A better way is to detect that there is no patterns like "dynamic_dim(t, idx)," on its own line.
@@ -1885,6 +1888,24 @@ def forced_specializations(self): | |||
if s in self._marked_dynamic | |||
]) | |||
|
|||
def remove_redundant_dynamic_results(self): |
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.
a bit of comment explaining its behavior would be nice.
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.
yeah, added
buf += f"\n```\ndef specify_constraints{str(signature)}:" | ||
buf += f"\n{indent}return [" | ||
print_results( | ||
grouped_dynamic_results, | ||
indent * 2, | ||
lambda result: f"{remove_default_lower_bound(result)},", |
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.
OOC, why is remove_default_lower_bound
not called any more?
This pull request was exported from Phabricator. Differential Revision: D48618472 |
c4331fb
to
9919454
Compare
This pull request was exported from Phabricator. Differential Revision: D48618472 |
9919454
to
7e80862
Compare
This pull request was exported from Phabricator. Differential Revision: D48618472 |
7e80862
to
dd3decb
Compare
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 1 mandatory check(s) failed. The first few are: Dig deeper by viewing the failures on hud |
This pull request was exported from Phabricator. Differential Revision: D48618472 |
Summary: Pull Request resolved: pytorch#107815 Test Plan: added test Differential Revision: D48618472 fbshipit-source-id: cfbeac2d3241380d331c07d3b37907798cb5b1df
dd3decb
to
4763fed
Compare
This pull request was exported from Phabricator. Differential Revision: D48618472 |
4763fed
to
9363bef
Compare
This pull request was exported from Phabricator. Differential Revision: D48618472 |
9363bef
to
eeb6ac6
Compare
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: Command
Details for Dev Infra teamRaised by workflow job |
Summary: Pull Request resolved: pytorch#107815 Test Plan: added test Reviewed By: tugsbayasgalan Differential Revision: D48618472 fbshipit-source-id: 0078811f405fd8ad5827edffcdcd3943091db62b
This pull request was exported from Phabricator. Differential Revision: D48618472 |
eeb6ac6
to
2fa0a8e
Compare
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Differential Revision: D48618472
cc @voznesenskym @penguinwu @anijain2305 @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @chenyang78 @aakhundov