Skip to content

Arm backend: Remove statically proven TOSA no-ops - #21141

Merged
YufengShi-dudu merged 1 commit into
pytorch:mainfrom
YufengShi-dudu:extend-remove-noop-pass
Jul 27, 2026
Merged

Arm backend: Remove statically proven TOSA no-ops#21141
YufengShi-dudu merged 1 commit into
pytorch:mainfrom
YufengShi-dudu:extend-remove-noop-pass

Conversation

@YufengShi-dudu

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

Copy link
Copy Markdown
Collaborator

Remove single-input concatenations, zero-width padding, and full-range slices when their identity behavior is statically proven. Reject unresolved symbolic shapes and eliminate constants left without users.

Run cleanup before transpose fusion and before duplicate/output cleanup so newly exposed patterns are simplified safely.

TOSA-FP operator counts:

Model Before After Reduction
Gemma AltUp 5 2 3
Gemma conformer light-conv 70 65 5
Qwen3-VL vision attention 124 113 11
Phi-3 attention 116 114 2

Add positive, negative, symbolic-shape, graph-output, and follow-on cleanup coverage.

Change-Id: I915a870d1bea4d27a89293c730e3f9f5f157cd3e

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

@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/21141

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

✅ No Failures

As of commit 6b31101 with merge base fb5b788 (image):
💚 Looks good so far! There are no failures yet. 💚

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
@YufengShi-dudu
YufengShi-dudu marked this pull request as draft July 24, 2026 11:32
Remove single-input concatenations, zero-width padding, and full-range
slices when their identity behavior is statically proven. Reject
unresolved symbolic shapes and eliminate constants left without users.

Run cleanup before transpose fusion and before duplicate/output cleanup
so newly exposed patterns are simplified safely.

TOSA-FP operator counts:

| Model                      | Before | After | Reduction |
|----------------------------|-------:|------:|----------:|
| Gemma AltUp                |      5 |     2 |         3 |
| Gemma conformer light-conv |     72 |    67 |         5 |
| Qwen3-VL vision attention  |    126 |   112 |        14 |
| Phi-3 attention            |    114 |   112 |         2 |

Add positive, negative, symbolic-shape, graph-output, and follow-on
cleanup coverage.

Change-Id: I915a870d1bea4d27a89293c730e3f9f5f157cd3e
Signed-off-by: Yufeng Shi <yufeng.shi@arm.com>
@YufengShi-dudu
YufengShi-dudu force-pushed the extend-remove-noop-pass branch from 9540726 to 6b31101 Compare July 27, 2026 11:47
@YufengShi-dudu
YufengShi-dudu marked this pull request as ready for review July 27, 2026 11:47
@YufengShi-dudu
YufengShi-dudu requested a review from freddan80 July 27, 2026 11:48
@YufengShi-dudu
YufengShi-dudu merged commit c48a7b2 into pytorch:main Jul 27, 2026
500 of 501 checks passed
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.

2 participants