Skip to content

Arm backend: Avoid unnecessary lowering pass retraces#21138

Open
YufengShi-dudu wants to merge 1 commit into
pytorch:mainfrom
YufengShi-dudu:avoid-unnecessary-lowering-passes-retraces
Open

Arm backend: Avoid unnecessary lowering pass retraces#21138
YufengShi-dudu wants to merge 1 commit into
pytorch:mainfrom
YufengShi-dudu:avoid-unnecessary-lowering-passes-retraces

Conversation

@YufengShi-dudu

@YufengShi-dudu YufengShi-dudu commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Add cheap applicability checks before selected Arm passes enter the ExportPass retracing path. Skip InsertRescalePass for profiles without integer support and graphs without DQ nodes. Move symbolic shape and adaptive pool passes to ArmOpTargetedPass, and pre-scan RemoveGetItemPass producers.

These checks preserve target-present transformations while avoiding retraces on non-applicable graphs.

Lowering times are medians of three fresh-process exports with no warm-up. Regular models use TOSA FP with FP32; full Qwen uses BF16.

Model Base (s) Updated (s) Speedup
ResNet-18 3.633 3.519 3.16%
MobileNetV3 11.063 10.100 8.70%
DeiT-tiny 33.323 31.137 6.56%
Conformer 13.121 12.204 6.98%
Test Qwen text 11.582 10.962 5.35%
Test Qwen vision 11.979 11.388 4.93%
Full Qwen text 155.825 146.824 5.78%
Full Qwen vision 126.671 120.153 5.15%

Change-Id: I3c539e023efb5d1e59a725e531c850a897758002

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

Add cheap applicability checks before selected Arm passes enter the
ExportPass retracing path. Skip InsertRescalePass for profiles without
integer support and graphs without DQ nodes. Move symbolic shape and
adaptive pool passes to ArmOpTargetedPass, and pre-scan
RemoveGetItemPass producers.

These checks preserve target-present transformations while avoiding
retraces on non-applicable graphs.

Lowering times are medians of three fresh-process exports with no
warm-up. Regular models use TOSA FP with FP32; full Qwen uses BF16.

| Model             | Base (s) | Updated (s) | Speedup |
|-------------------|---------:|------------:|--------:|
| ResNet-18         |    3.633 |       3.519 |   3.16% |
| MobileNetV3       |   11.063 |      10.100 |   8.70% |
| DeiT-tiny         |   33.323 |      31.137 |   6.56% |
| Conformer         |   13.121 |      12.204 |   6.98% |
| Test Qwen text    |   11.582 |      10.962 |   5.35% |
| Test Qwen vision  |   11.979 |      11.388 |   4.93% |
| Full Qwen text    |  155.825 |     146.824 |   5.78% |
| Full Qwen vision  |  126.671 |     120.153 |   5.15% |

Change-Id: I3c539e023efb5d1e59a725e531c850a897758002
Signed-off-by: Yufeng Shi <yufeng.shi@arm.com>
@YufengShi-dudu YufengShi-dudu added partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm ciflow/trunk module: arm Issues related to arm backend release notes: none Do not include this in the release notes labels Jul 22, 2026
@pytorch-bot

pytorch-bot Bot commented Jul 22, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

❌ 1 New Failure, 1 Unrelated Failure

As of commit 12d98d3 with merge base 5442036 (image):

NEW FAILURE - The following job has failed:

BROKEN TRUNK - The following job 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 Jul 22, 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. module: arm Issues related to arm backend 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