Skip to content

[sympy] fix ValueRanges.pow error when b.lower is float#95151

Closed
nmacchioni wants to merge 1 commit intopytorch:masterfrom
nmacchioni:export-D43430385
Closed

[sympy] fix ValueRanges.pow error when b.lower is float#95151
nmacchioni wants to merge 1 commit intopytorch:masterfrom
nmacchioni:export-D43430385

Conversation

@nmacchioni
Copy link
Copy Markdown
Contributor

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

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
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Feb 20, 2023

🔗 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 Failures

As of commit 8ffd2f8:
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D43430385

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@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)

@pytorchmergebot
Copy link
Copy Markdown
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Copy Markdown
Collaborator

Merge failed

Reason: PR #95151 has not been reviewed yet

Details for Dev Infra team Raised by workflow job Failing merge rule: Core Maintainers

@Skylion007
Copy link
Copy Markdown
Collaborator

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Feb 20, 2023
@pytorchmergebot
Copy link
Copy Markdown
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

@ezyang
Copy link
Copy Markdown
Contributor

ezyang commented Feb 21, 2023

This is not entirely correct, so I will still land my updated fix

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):
Copy link
Copy Markdown
Contributor

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

pruthvistony added a commit to ROCm/pytorch that referenced this pull request May 2, 2023
jhavukainen pushed a commit to kulinseth/pytorch that referenced this pull request Mar 15, 2024
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request fb-exported Merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants