-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
[sympy] fix ValueRanges.pow error when b.lower is float #95151
Conversation
Summary: fix `TypeError: 'Float' object cannot be interpreted as an integer` for `ValueRanges.pow(a, b)` when `not a.is_singleton() and b.is_singleton() and not isinstance(b.lower, int)` this is breaking `cuda11.7-py3.10-gcc7-sm86 / test (inductor_timm, 1, 2, linux.g5.4xlarge.nvidia.gpu)` {F878635541} Test Plan: sandcastle + CI Differential Revision: D43430385 fbshipit-source-id: 3be96f37be6898b8c87184b45f82dd80c039d40b
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/95151
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 8ffd2f8: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This pull request was exported from Phabricator. Differential Revision: D43430385 |
@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). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: PR #95151 has not been reviewed yet Details for Dev Infra teamRaised by workflow job Failing merge rule: Core Maintainers |
@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 |
This is not entirely correct, so I will still land my updated fix |
@@ -367,7 +367,7 @@ def pow(cls, a, b): | |||
if r == sympy.zoo: | |||
return ValueRanges.unknown() | |||
return ValueRanges.wrap(r) | |||
elif b.is_singleton() and b.lower >= 0: | |||
elif b.is_singleton() and b.lower >= 0 and isinstance(b.lower, int): |
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.
b.lower is in fact never an int as it is always a sympy expression
…rch#95151)" This reverts commit 83b5eb4.
Summary: fix `TypeError: 'Float' object cannot be interpreted as an integer` for `ValueRanges.pow(a, b)` when `not a.is_singleton() and b.is_singleton() and not isinstance(b.lower, int)` this is breaking `cuda11.7-py3.10-gcc7-sm86 / test (inductor_timm, 1, 2, linux.g5.4xlarge.nvidia.gpu)` {F878635541} Test Plan: sandcastle + CI Differential Revision: D43430385 Pull Request resolved: pytorch#95151 Approved by: https://github.com/Skylion007
Summary:
fix
TypeError: 'Float' object cannot be interpreted as an integer
forValueRanges.pow(a, b)
whennot a.is_singleton() and b.is_singleton() and not isinstance(b.lower, int)
this is breaking
cuda11.7-py3.10-gcc7-sm86 / test (inductor_timm, 1, 2, linux.g5.4xlarge.nvidia.gpu)
{F878635541}
Test Plan: sandcastle + CI
Differential Revision: D43430385