-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Turn on type-checking in torch.fx.experimental.symbolic_shapes #136972
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/136972
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 147 PendingAs of commit ca05599 with merge base failed to retrieve merge base, please contact dev infra: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
| assert arg.fake_tensor is not None | ||
|
|
||
| def bind_symint(s, prop): | ||
| def bind_symint(s: torch.SymInt, prop): |
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 specify return type
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.
There are actually a lot of untyped defs, I'm working on them in the next PR in stack
| and raw_u1.args[0][0] == 1 | ||
| and isinstance(eq := raw_u1.args[0][1], sympy.Eq) | ||
| and ( | ||
| raw_u1_args0 := cast( |
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.
We need casting? We can't just specify the type here before the walrus op?
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.
Unfortunately, sympy annotates the type of args as Sequence[sympy.Basic], so the type annotation of args[0] is Basic when it needs to be a Tuple (because Piecewise). So even if we specified the type in walrus we would need to also do a mypy ignore.
|
@pytorchbot merge -i |
Merge startedYour change will be merged while ignoring the following 1 checks: Lint / Test 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: inductor-periodic / cuda12.1-py3.10-gcc9-sm80 / test (inductor_torchbench_smoketest_perf, 1, 1, linux.gcp.a100) Details for Dev Infra teamRaised by workflow job |
|
@pytorchbot merge -f "looks good" |
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 |
|
@pytorchbot merge -c nosignal -m "need to back out for merge conflict" |
|
❌ 🤖 pytorchbot command failed: Try |
|
@pytorchbot revert -c nosignal -m "need to back out for merge conflict" |
|
@pytorchbot successfully started a revert job. Check the current status here. |
#136972)" This reverts commit 3ff2d93. Reverted #136972 on behalf of https://github.com/ezyang due to need to back out for merge conflict ([comment](#136972 (comment)))
|
@ezyang your PR has been successfully reverted. |
…137019) Signed-off-by: Edward Z. Yang <[email protected]> Pull Request resolved: #137019 Approved by: https://github.com/Skylion007 ghstack dependencies: #136934, #136935, #136972
…ch#136972) Signed-off-by: Edward Z. Yang <[email protected]> Pull Request resolved: pytorch#136972 Approved by: https://github.com/Skylion007 ghstack dependencies: pytorch#136917, pytorch#136934, pytorch#136935
pytorch#136972)" This reverts commit 3ff2d93. Reverted pytorch#136972 on behalf of https://github.com/ezyang due to need to back out for merge conflict ([comment](pytorch#136972 (comment)))
…ch#136972) Signed-off-by: Edward Z. Yang <[email protected]> Pull Request resolved: pytorch#136972 Approved by: https://github.com/Skylion007 ghstack dependencies: pytorch#136934, pytorch#136935
…ytorch#137019) Signed-off-by: Edward Z. Yang <[email protected]> Pull Request resolved: pytorch#137019 Approved by: https://github.com/Skylion007 ghstack dependencies: pytorch#136934, pytorch#136935, pytorch#136972
Stack from ghstack (oldest at bottom):
Signed-off-by: Edward Z. Yang [email protected]
cc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @voznesenskym @penguinwu @EikanWang @Guobing-Chen @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire @chauhang @rec