-
Notifications
You must be signed in to change notification settings - Fork 25.7k
switch prefer_deferred_runtime_asserts_over_guards in export #160111
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/160111
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ✅ No FailuresAs of commit 30e9d1e with merge base 4b4cdcf ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
This pull request was exported from Phabricator. Differential Revision: D79734206 |
|
This pull request was exported from Phabricator. Differential Revision: D79734206 |
5f14570 to
494f00b
Compare
…#160111) Summary: Pull Request resolved: pytorch#160111 In preparation for checking shape guards in export, this PR effectively switches `prefer_deferred_runtime_asserts_over_guards` to `False`, matching Dynamo. Actually that's a lie: we switch it to `allow_complex_guards_as_runtime_asserts`, which is `False` by default but can be controlled via an internally API to be `True`. This makes the two flags synchronized, so we should be able to kill `allow_complex_guards_as_runtime_asserts` at this point. Test Plan: updated tests Rollback Plan: Differential Revision: D79734206
|
This pull request was exported from Phabricator. Differential Revision: D79734206 |
494f00b to
d30a2b4
Compare
…#160111) Summary: Pull Request resolved: pytorch#160111 In preparation for checking shape guards in export, this PR effectively switches `prefer_deferred_runtime_asserts_over_guards` to `False`, matching Dynamo. Actually that's a lie: we switch it to `allow_complex_guards_as_runtime_asserts`, which is `False` by default but can be controlled via an internally API to be `True`. This makes the two flags synchronized, so we should be able to kill `allow_complex_guards_as_runtime_asserts` at this point. Test Plan: updated tests Rollback Plan: Differential Revision: D79734206
|
This pull request was exported from Phabricator. Differential Revision: D79734206 |
…#160111) Summary: Pull Request resolved: pytorch#160111 In preparation for checking shape guards in export, this PR effectively switches `prefer_deferred_runtime_asserts_over_guards` to `False`, matching Dynamo. Actually that's a lie: we switch it to `allow_complex_guards_as_runtime_asserts`, which is `False` by default but can be controlled via an internally API to be `True`. This makes the two flags synchronized, so we should be able to kill `allow_complex_guards_as_runtime_asserts` at this point. Test Plan: updated tests Rollback Plan: Differential Revision: D79734206
d30a2b4 to
a651671
Compare
Summary: In preparation for checking shape guards in export, this PR effectively switches `prefer_deferred_runtime_asserts_over_guards` to `False`, matching Dynamo. Actually that's a lie: we switch it to `allow_complex_guards_as_runtime_asserts`, which is `False` by default but can be controlled via an internally API to be `True`. This makes the two flags synchronized, so we should be able to kill `allow_complex_guards_as_runtime_asserts` at this point. Test Plan: updated tests Rollback Plan: Differential Revision: D79734206
|
This pull request was exported from Phabricator. Differential Revision: D79734206 |
a651671 to
55bc169
Compare
…#160111) Summary: Pull Request resolved: pytorch#160111 In preparation for checking shape guards in export, this PR effectively switches `prefer_deferred_runtime_asserts_over_guards` to `False`, matching Dynamo. Actually that's a lie: we switch it to `allow_complex_guards_as_runtime_asserts`, which is `False` by default but can be controlled via an internally API to be `True`. This makes the two flags synchronized, so we should be able to kill `allow_complex_guards_as_runtime_asserts` at this point. Test Plan: updated tests Rollback Plan: Differential Revision: D79734206
| dynamic_shapes: Optional[Union[dict[str, Any], tuple[Any, ...], list[Any]]] = None, | ||
| strict: bool = False, | ||
| preserve_module_call_signature: tuple[str, ...] = (), | ||
| prefer_deferred_runtime_asserts_over_guards: bool = False, |
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 this be in the toplevel export API?
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.
I feel you also need to propagate it to export_for_training as well.
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.
@angelayi Yes, intentional: I pushed it up to the top level to act as a switch to manage risk.
@tugsbayasgalan The tests didn't need me to push this to export_for_training. Since it's on the way to deprecation, leave as is?
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.
Hmm interesting. Today torch.export.export calls into torch.export._trace._export_for_training at pre-dispatch level. So if tests are not catching it, something seems off. I still think we should add it tho because the way we are marketing the deprecation is that torch.export.export and torch.export.export_for_training are exact same APIs. Having different flags will make them look different.
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.
To be clear, _export_for_training does have this flag. Anyway, I can add it.
55bc169 to
c841051
Compare
Summary: In preparation for checking shape guards in export, this PR effectively switches `prefer_deferred_runtime_asserts_over_guards` to `False`, matching Dynamo. Actually that's a lie: we switch it to `allow_complex_guards_as_runtime_asserts`, which is `False` by default but can be controlled via an internally API to be `True`. This makes the two flags synchronized, so we should be able to kill `allow_complex_guards_as_runtime_asserts` at this point. Test Plan: updated tests Rollback Plan: Differential Revision: D79734206
…#160111) Summary: In preparation for checking shape guards in export, this PR effectively switches `prefer_deferred_runtime_asserts_over_guards` to `False`, matching Dynamo. Actually that's a lie: we switch it to `allow_complex_guards_as_runtime_asserts`, which is `False` by default but can be controlled via an internally API to be `True`. This makes the two flags synchronized, so we should be able to kill `allow_complex_guards_as_runtime_asserts` at this point. Test Plan: updated tests Rollback Plan: Differential Revision: D79734206
|
This pull request was exported from Phabricator. Differential Revision: D79734206 |
c841051 to
1b09fe1
Compare
…#160111) Summary: Pull Request resolved: pytorch#160111 In preparation for checking shape guards in export, this PR effectively switches `prefer_deferred_runtime_asserts_over_guards` to `False`, matching Dynamo. Actually that's a lie: we switch it to `allow_complex_guards_as_runtime_asserts`, which is `False` by default but can be controlled via an internally API to be `True`. This makes the two flags synchronized, so we should be able to kill `allow_complex_guards_as_runtime_asserts` at this point. Test Plan: updated tests Rollback Plan: Differential Revision: D79734206
…#160111) Summary: Pull Request resolved: pytorch#160111 In preparation for checking shape guards in export, this PR effectively switches `prefer_deferred_runtime_asserts_over_guards` to `False`, matching Dynamo. Actually that's a lie: we switch it to `allow_complex_guards_as_runtime_asserts`, which is `False` by default but can be controlled via an internally API to be `True`. This makes the two flags synchronized, so we should be able to kill `allow_complex_guards_as_runtime_asserts` at this point. Test Plan: updated tests Rollback Plan: Differential Revision: D79734206
|
This pull request was exported from Phabricator. Differential Revision: D79734206 |
…#160111) Summary: Pull Request resolved: pytorch#160111 In preparation for checking shape guards in export, this PR effectively switches `prefer_deferred_runtime_asserts_over_guards` to `False`, matching Dynamo. Actually that's a lie: we switch it to `allow_complex_guards_as_runtime_asserts`, which is `False` by default but can be controlled via an internally API to be `True`. This makes the two flags synchronized, so we should be able to kill `allow_complex_guards_as_runtime_asserts` at this point. Test Plan: updated tests Rollback Plan: Differential Revision: D79734206
0b17893 to
2014a9b
Compare
…#160111) Summary: In preparation for checking shape guards in export, this PR effectively switches `prefer_deferred_runtime_asserts_over_guards` to `False`, matching Dynamo. Actually that's a lie: we switch it to `allow_complex_guards_as_runtime_asserts`, which is `False` by default but can be controlled via an internally API to be `True`. This makes the two flags synchronized, so we should be able to kill `allow_complex_guards_as_runtime_asserts` at this point. Test Plan: updated tests Rollback Plan: Differential Revision: D79734206
…#160111) Summary: In preparation for checking shape guards in export, this PR effectively switches `prefer_deferred_runtime_asserts_over_guards` to `False`, matching Dynamo. Actually that's a lie: we switch it to `allow_complex_guards_as_runtime_asserts`, which is `False` by default but can be controlled via an internally API to be `True`. This makes the two flags synchronized, so we should be able to kill `allow_complex_guards_as_runtime_asserts` at this point. Test Plan: updated tests Rollback Plan: Differential Revision: D79734206
|
This pull request was exported from Phabricator. Differential Revision: D79734206 |
2014a9b to
d87ccec
Compare
…#160111) Summary: Pull Request resolved: pytorch#160111 In preparation for checking shape guards in export, this PR effectively switches `prefer_deferred_runtime_asserts_over_guards` to `False`, matching Dynamo. Actually that's a lie: we switch it to `allow_complex_guards_as_runtime_asserts`, which is `False` by default but can be controlled via an internally API to be `True`. This makes the two flags synchronized, so we should be able to kill `allow_complex_guards_as_runtime_asserts` at this point. Test Plan: updated tests Rollback Plan: Differential Revision: D79734206
|
This pull request was exported from Phabricator. Differential Revision: D79734206 |
…#160111) Summary: Pull Request resolved: pytorch#160111 In preparation for checking shape guards in export, this PR effectively switches `prefer_deferred_runtime_asserts_over_guards` to `False`, matching Dynamo. Actually that's a lie: we switch it to `allow_complex_guards_as_runtime_asserts`, which is `False` by default but can be controlled via an internally API to be `True`. This makes the two flags synchronized, so we should be able to kill `allow_complex_guards_as_runtime_asserts` at this point. Test Plan: updated tests Rollback Plan: Differential Revision: D79734206
d87ccec to
f5a6f07
Compare
…#160111) Summary: In preparation for checking shape guards in export, this PR effectively switches `prefer_deferred_runtime_asserts_over_guards` to `False`, matching Dynamo. Actually that's a lie: we switch it to `allow_complex_guards_as_runtime_asserts`, which is `False` by default but can be controlled via an internally API to be `True`. This makes the two flags synchronized, so we should be able to kill `allow_complex_guards_as_runtime_asserts` at this point. Test Plan: updated tests Rollback Plan: Differential Revision: D79734206
…#160111) Summary: In preparation for checking shape guards in export, this PR effectively switches `prefer_deferred_runtime_asserts_over_guards` to `False`, matching Dynamo. Actually that's a lie: we switch it to `allow_complex_guards_as_runtime_asserts`, which is `False` by default but can be controlled via an internally API to be `True`. This makes the two flags synchronized, so we should be able to kill `allow_complex_guards_as_runtime_asserts` at this point. Test Plan: updated tests Rollback Plan: Differential Revision: D79734206
…#160111) Summary: Pull Request resolved: pytorch#160111 In preparation for checking shape guards in export, this PR effectively switches `prefer_deferred_runtime_asserts_over_guards` to `False`, matching Dynamo. Actually that's a lie: we switch it to `allow_complex_guards_as_runtime_asserts`, which is `False` by default but can be controlled via an internally API to be `True`. This makes the two flags synchronized, so we should be able to kill `allow_complex_guards_as_runtime_asserts` at this point. Test Plan: updated tests Rollback Plan: Differential Revision: D79734206
|
This pull request was exported from Phabricator. Differential Revision: D79734206 |
f5a6f07 to
30e9d1e
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 |
|
@pytorchbot merge (Initiating merge automatically since Phabricator Diff has merged) |
|
Can't merge closed PR #160111 |
…#160111) Summary: In preparation for checking shape guards in export, this PR effectively switches `prefer_deferred_runtime_asserts_over_guards` to `False`, matching Dynamo. Actually that's a lie: we switch it to `allow_complex_guards_as_runtime_asserts`, which is `False` by default but can be controlled via an internally API to be `True`. This makes the two flags synchronized, so we should be able to kill `allow_complex_guards_as_runtime_asserts` at this point. Test Plan: updated tests Rollback Plan: Differential Revision: D79734206 Pull Request resolved: pytorch#160111 Approved by: https://github.com/tugsbayasgalan
Summary:
In preparation for checking shape guards in export, this PR effectively switches
prefer_deferred_runtime_asserts_over_guardstoFalse, matching Dynamo.Actually that's a lie: we switch it to
allow_complex_guards_as_runtime_asserts, which isFalseby default but can be controlled via an internally API to beTrue. This makes the two flags synchronized, so we should be able to killallow_complex_guards_as_runtime_assertsat this point.Test Plan:
updated tests
Rollback Plan:
Differential Revision: D79734206
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben