-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Handle Rational
divisors in FloorDiv
.
#106644
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
Follow-up: #101173 This PR fixes the bug presented in #101173 by creating a special case for `sympy.Rational` divisors, inside `FloorDiv` evaluation. In summary: ```python FloorDiv(a, Rational(1, b)) a * b ``` Besides that, this PR also does 2 other things: - Replaces the use of the old `sympy.Mod` by the internal `Mod` (there were a few places that were still looking for the SymPy one) - Introduces debugging logs to the translation validator. These can be seen by setting the environment variable: `TORCH_LOGS=+torch.fx.experimental.validator` [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/106644
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit a0b0050: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
…le `Rational` divisors in `FloorDiv`." Follow-up: #101173 This PR fixes the bug presented in #101173 by creating a special case for `sympy.Rational` divisors, inside `FloorDiv` evaluation. In summary: ```python FloorDiv(a, Rational(1, b)) a * b ``` Besides that, this PR also does 2 other things: - Replaces the use of the old `sympy.Mod` by the internal `Mod` (there were a few places that were still looking for the SymPy one) - Introduces debugging logs to the translation validator. These can be seen by setting the environment variable: `TORCH_LOGS=+torch.fx.experimental.validator` [ghstack-poisoned]
@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: PR #106643 has not been reviewed yet |
@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 |
Follow-up: pytorch#101173 This PR fixes the bug presented in pytorch#101173 by creating a special case for `sympy.Rational` divisors, inside `FloorDiv` evaluation. In summary: ```python FloorDiv(a, Rational(1, b)) a * b ``` Besides that, this PR also does 2 other things: - Replaces the use of the old `sympy.Mod` by the internal `Mod` (there were a few places that were still looking for the SymPy one) - Introduces debugging logs to the translation validator. These can be seen by setting the environment variable: `TORCH_LOGS=+torch.fx.experimental.validator` Pull Request resolved: pytorch#106644 Approved by: https://github.com/ezyang ghstack dependencies: pytorch#106643
Stack from ghstack (oldest at bottom):
Rational
divisors inFloorDiv
. #106644Follow-up: #101173
This PR fixes the bug presented in #101173 by creating a special case for
sympy.Rational
divisors, inside
FloorDiv
evaluation. In summary:Besides that, this PR also does 2 other things:
Replaces the use of the old
sympy.Mod
by the internalMod
(there were a few placesthat were still looking for the SymPy one)
Introduces debugging logs to the translation validator. These can be seen by setting the
environment variable:
TORCH_LOGS=+torch.fx.experimental.validator