-
Notifications
You must be signed in to change notification settings - Fork 25.7k
dynamic_shapes + retrace exported program #110276
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/110276
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New FailureAs of commit 21be12a with merge base acac92f ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
This pull request was exported from Phabricator. Differential Revision: D49764011 |
Summary: Pull Request resolved: pytorch#110276 Test Plan: modified test Differential Revision: D49764011
|
This pull request was exported from Phabricator. Differential Revision: D49764011 |
bd4295d to
21be12a
Compare
| import inspect | ||
| signature = inspect.signature(f.forward) if isinstance(f, torch.nn.Module) else inspect.signature(f) | ||
| combined_args = signature.bind(*args, **kwargs).arguments | ||
| if isinstance(f, ExportedProgram): |
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.
main change here
| from typing import get_origin, get_args | ||
|
|
||
| def assoc_zip(combined_args, dynamic_shapes): | ||
| def tree_zip(combined_args, dynamic_shapes): |
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.
Ignore this part, it has nothing to do with this PR. Just cleaning up.
|
@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 jobs have failed, first few of them are: trunk / linux-focal-rocm5.6-py3.8 / test (default, 1, 3, linux.rocm.gpu) Details for Dev Infra teamRaised by workflow job |
|
@pytorchbot merge -i "unrelated IO failure" |
|
@pytorchbot merge -i |
Merge startedYour change will be merged while ignoring the following 1 checks: trunk / linux-focal-rocm5.6-py3.8 / test (default, 1, 3, linux.rocm.gpu) Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
An
ExportedProgram's__call__signature is different from the original module, sodynamic_shapesthat follow the original signature would fail when applied to re-export anExportedProgram.This PR fixes this issue, in other words, the original
dynamic_shapesshould now work when re-exporting.Differential Revision: D49764011