Skip to content

Arm backend: Decompose where.ScalarOther for quantization support#18132

Open
YufengShi-dudu wants to merge 1 commit intopytorch:mainfrom
YufengShi-dudu:support-quantization-for-where-scale-other
Open

Arm backend: Decompose where.ScalarOther for quantization support#18132
YufengShi-dudu wants to merge 1 commit intopytorch:mainfrom
YufengShi-dudu:support-quantization-for-where-scale-other

Conversation

@YufengShi-dudu
Copy link
Collaborator

@YufengShi-dudu YufengShi-dudu commented Mar 12, 2026

Arm quantizer does not annotate aten.where.ScalarOther, so where remains unquantized after it is rewritten to aten.where.self pre-QUANTIZE.

Decompose where.ScalarOther(cond, x, s) into where.self(cond, x, full_like(x, s)) before QUANTIZE so existing where.self annotation can handle it.

Change-Id: I82a7ffec5e3e037219ab7185d71371c7c14a5b4f

cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell

Arm quantizer does not annotate aten.where.ScalarOther, so where
remains unquantized after it is rewritten to aten.where.self
pre-QUANTIZE.

Decompose where.ScalarOther(cond, x, s) into where.self(cond, x,
full_like(x, s)) before QUANTIZE so existing where.self annotation
can handle it.

Change-Id: I82a7ffec5e3e037219ab7185d71371c7c14a5b4f
Signed-off-by: Yufeng Shi <yufeng.shi@arm.com>
@YufengShi-dudu YufengShi-dudu requested a review from zingo March 12, 2026 17:27
@YufengShi-dudu YufengShi-dudu 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 Mar 12, 2026
@pytorch-bot
Copy link

pytorch-bot bot commented Mar 12, 2026

🔗 Helpful Links

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

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

❌ 2 New Failures, 1 Cancelled Job, 11 Pending, 15 Unrelated Failures

As of commit 026943b with merge base 884ace9 (image):

NEW FAILURES - The following jobs have failed:

CANCELLED JOB - The following job was cancelled. Please retry:

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

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.

@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 Mar 12, 2026
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.

1 participant