Skip to content

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.

swolchok added 3 commits July 1, 2025 19:14
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
@swolchok
Copy link
Contributor Author

swolchok commented Jul 2, 2025

Stack from ghstack (oldest at bottom):

@pytorch-bot
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, 3 Pending

As of commit 6eddd12 with merge base f6bb143 (image):

NEW FAILURE - The following job has failed:

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
Comment on lines +35 to +39
if (
op == torch.ops.aten.div.Tensor_mode
and kwargs.get("rounding_mode") is None
):
promotion_kind = ELEMENTWISE_TYPE_PROMOTION_KIND.INT_TO_FLOAT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you saying div.Tensor_mode without rounding_mode specified is equivalent to div.Tensor

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@swolchok
Copy link
Contributor Author

swolchok commented Jul 7, 2025

noting green tests except lintrunner

swolchok added 2 commits July 7, 2025 10:21
[ghstack-poisoned]
[ghstack-poisoned]
swolchok added a commit that referenced this pull request Jul 7, 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: 0d3aa92
ghstack-comment-id: 3026116637
Pull-Request-resolved: #12157
@swolchok
Copy link
Contributor Author

swolchok commented Jul 7, 2025

pull / test-eval_llama-mmlu-linux / linux-job (pull_request) has previously passed and flaked this time, calling it good

Base automatically changed from gh/swolchok/491/head to main July 7, 2025 20:08
[ghstack-poisoned]
swolchok added a commit that referenced this pull request Jul 7, 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: b75ace2
ghstack-comment-id: 3026116637
Pull-Request-resolved: #12157
@swolchok swolchok merged commit d952326 into main Jul 7, 2025
94 of 97 checks passed
@swolchok swolchok deleted the gh/swolchok/492/head branch July 7, 2025 21:20
Tanish2101 pushed a commit to Tanish2101/executorch that referenced this pull request Jul 9, 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.
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.

4 participants