Skip to content

Fix double-promotion in rsqrt for reduced-precision types#16221

Open
perheld wants to merge 1 commit intopytorch:mainfrom
perheld:ph-double-promotion
Open

Fix double-promotion in rsqrt for reduced-precision types#16221
perheld wants to merge 1 commit intopytorch:mainfrom
perheld:ph-double-promotion

Conversation

@perheld
Copy link
Collaborator

@perheld perheld commented Dec 12, 2025

Keep the bfloat16/fp16 rsqrt helper in float precision so Zephyr’s -Wdouble-promotion (treated as an error) no longer fires when ExecuTorch is built for Cortex-M targets.

Signed-off-by: per.held@arm.com
Change-Id: I8fbcc99d8aebac67c4164f2ad502e9b3081386b4

cc @freddan80 @per @zingo @oscarandersson8218 @digantdesai

@perheld perheld added partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm ciflow/trunk release notes: none Do not include this in the release notes labels Dec 12, 2025
@pytorch-bot
Copy link

pytorch-bot bot commented Dec 12, 2025

🔗 Helpful Links

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

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

❌ 3 New Failures, 4 Unrelated Failures

As of commit 128e2a8 with merge base cdc2701 (image):

NEW FAILURES - The following jobs have failed:

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

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

UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:

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

@meta-cla meta-cla 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 Dec 12, 2025
Keep the bfloat16/fp16 rsqrt helper in float precision so Zephyr’s
-Wdouble-promotion (treated as an error) no longer fires when
ExecuTorch is built for Cortex-M targets.

Signed-off-by: per.held@arm.com
Change-Id: I8fbcc99d8aebac67c4164f2ad502e9b3081386b4
@perheld perheld force-pushed the ph-double-promotion branch from 1451366 to 128e2a8 Compare December 12, 2025 12:34
@perheld
Copy link
Collaborator Author

perheld commented Dec 12, 2025

@digantdesai is c10 something that is copied from pytorch and needs fixing upstream there if there is a needed change?

@zingo
Copy link
Collaborator

zingo commented Jan 14, 2026

Hi @SS-JIA / @swolchok is this something we want to do or if from PyTorch maybe we rather not touch it?

And if fixed maybe this can be removed from the file:

C10_CLANG_DIAGNOSTIC_PUSH()
#if C10_CLANG_HAS_WARNING("-Wimplicit-float-conversion")
C10_CLANG_DIAGNOSTIC_IGNORE("-Wimplicit-float-conversion")
#endif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm 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