Skip to content

fix type promotion for div in RemoveMixedTypeOperators #12157

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

Open
wants to merge 1 commit into
base: gh/swolchok/491/head
Choose a base branch
from

Conversation

swolchok
Copy link
Contributor

@swolchok swolchok commented Jul 2, 2025

The promotion strategy is dependent on the rounding mode (see the div
decomp in PyTorch
https://github.com/pytorch/pytorch/blob/main/torch/_refs/__init__.py#L1214
and then the promotion annotation on each of the
true_divide/trunc_divide/floor_divide functions itcalls).

I had to restructure the test a bit more so that lint didn't complain it was too complex.

[ghstack-poisoned]
@swolchok
Copy link
Contributor Author

swolchok commented Jul 2, 2025

Copy link

pytorch-bot bot commented Jul 2, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/12157

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure, 2 Unrelated Failures

As of commit 4581d22 with merge base 7e28a04 (image):

NEW FAILURE - The following job has failed:

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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

swolchok added a commit that referenced this pull request Jul 2, 2025
The promotion strategy is dependent on the rounding mode (see the div
decomp in PyTorch
https://github.com/pytorch/pytorch/blob/main/torch/_refs/__init__.py#L1214
and then the promotion annotation on each of the
true_divide/trunc_divide/floor_divide functions itcalls).

I had to restructure the test a bit more so that lint didn't complain it was too complex.


ghstack-source-id: 20618fd
ghstack-comment-id: 3026116637
Pull-Request-resolved: #12157
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 2, 2025
@swolchok swolchok added the release notes: none Do not include this in the release notes label Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. release notes: none Do not include this in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants