Skip to content

Arm backend: allow global register for ArmBackend pass insertions#18937

Open
robell wants to merge 2 commits intopytorch:mainfrom
robell:register_passes
Open

Arm backend: allow global register for ArmBackend pass insertions#18937
robell wants to merge 2 commits intopytorch:mainfrom
robell:register_passes

Conversation

@robell
Copy link
Copy Markdown
Collaborator

@robell robell commented Apr 16, 2026

To make the use of custom ops easier (which rely on passes to handle rewrite
and prevent decomposition) - provide a simple mechanism to insert them into
the pass manager using existing functionality.

Also a small commit which fixes missing doc updates.

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

robell added 2 commits April 16, 2026 09:32
This enables global extension of passes using classmethod registration
enabling out-of-tree custom op passes.

Signed-off-by: Rob Elliott <Robert.Elliott@arm.com>
Change-Id: Ia292eca0720433fb2d0cda0605c4485be993f3fc
Signed-off-by: Rob Elliott <Robert.Elliott@arm.com>
Copilot AI review requested due to automatic review settings April 16, 2026 08:41
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Apr 16, 2026

🔗 Helpful Links

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

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:

❌ 3 New Failures, 6 Cancelled Jobs, 3 Unrelated Failures

As of commit bddec2a with merge base a6e4ade (image):

NEW FAILURES - The following jobs have failed:

CANCELLED JOBS - The following jobs were cancelled. Please retry:

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 Apr 16, 2026
@robell robell changed the title Register passes Arm backend: allow global register for ArmBackend pass insertions Apr 16, 2026
@robell robell added release notes: none Do not include this in the release notes partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm ciflow/trunk labels Apr 16, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Arm backend update to enable globally registering pass insertions into ArmPassManager pipelines (useful for custom ops that need rewrite/prevent decomposition), plus documentation updates to mention custom partition ops registration.

Changes:

  • Add a module-level registry and helper functions to register pass insertions before/after a target pass type for all Arm pipelines.
  • Apply globally registered pass insertions during Arm pipeline construction via _configure_pass_insertions.
  • Update Arm VGF and Ethos-U partitioner docs to include register_custom_partition_op.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
docs/source/backends/arm-vgf/arm-vgf-partitioner.md Documents register_custom_partition_op for the VGF partitioner API reference.
docs/source/backends/arm-ethos-u/arm-ethos-u-partitioner.md Documents register_custom_partition_op for the Ethos-U partitioner API reference.
backends/arm/_passes/arm_pass_manager.py Introduces global pass insertion registration and applies those insertions during pipeline setup.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread backends/arm/_passes/arm_pass_manager.py
Comment thread backends/arm/_passes/arm_pass_manager.py
Comment thread backends/arm/_passes/arm_pass_manager.py
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.

3 participants