-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[export] hook up mark_dynamic to export Dims #137029
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/137029
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (2 Unrelated Failures)As of commit 7913b67 with merge base 475a8a4 ( FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@pianpwk has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
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.
Please commit the suggested changes from pytorch's linter.
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.
Please commit the suggested changes from pytorch's linter.
torch/export/dynamic_shapes.py
Outdated
import sympy | ||
|
||
from torch.fx.experimental.symbolic_shapes import StrictMinMaxConstraint | ||
from torch.fx.experimental.symbolic_shapes import RelaxedUnspecConstraint, StrictMinMaxConstraint |
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.
from torch.fx.experimental.symbolic_shapes import RelaxedUnspecConstraint, StrictMinMaxConstraint | |
from torch.fx.experimental.symbolic_shapes import StrictMinMaxConstraint |
@pianpwk has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
||
with self.assertRaisesRegex( | ||
torch._dynamo.exc.UserError, | ||
r"Not all values of RelaxedUnspecConstraint.* are valid because .* was inferred to be a constant", |
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.
nit: we shouldn't be exposing internal names like RelaxedUnspecConstraint
in user-facing errors, they're noise.
@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 |
Adds Dim.DYNAMIC which calls torch._dynamo.mark_dynamic() in the backend. Similar to Dim.AUTO in that it does automatic inference for ranges & relations, but errors out for specializations. Pull Request resolved: pytorch#137029 Approved by: https://github.com/avikchaudhuri
Adds Dim.DYNAMIC which calls torch._dynamo.mark_dynamic() in the backend. Similar to Dim.AUTO in that it does automatic inference for ranges & relations, but errors out for specializations.