Arm backend: allow global register for ArmBackend pass insertions#18937
Arm backend: allow global register for ArmBackend pass insertions#18937robell wants to merge 2 commits intopytorch:mainfrom
Conversation
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>
🔗 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 SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 3 New Failures, 6 Cancelled Jobs, 3 Unrelated FailuresAs of commit bddec2a with merge base a6e4ade ( 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. |
There was a problem hiding this comment.
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.
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