Skip to content

EdgeProgramManager passes (#16986)#16986

Draft
DrJessop wants to merge 1 commit intopytorch:mainfrom
DrJessop:export-D91725222
Draft

EdgeProgramManager passes (#16986)#16986
DrJessop wants to merge 1 commit intopytorch:mainfrom
DrJessop:export-D91725222

Conversation

@DrJessop
Copy link
Copy Markdown
Contributor

@DrJessop DrJessop commented Jan 29, 2026

Summary:

  • Adds support to run to run passes on ExportedPrograms and EdgeProgramManager
  • EdgeProgramManager transform behaves basically like a pass manager

Reviewed By: larryliu0820, ethansfng

Differential Revision: D91725222

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Jan 29, 2026

🔗 Helpful Links

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

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:

⏳ 2 Pending, 2 Unrelated Failures

As of commit d2271e6 with merge base 651f2f2 (image):

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 Jan 29, 2026
@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync bot commented Jan 29, 2026

@DrJessop has exported this pull request. If you are a Meta employee, you can view the originating Diff in D91725222.

@github-actions
Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

DrJessop pushed a commit to DrJessop/executorch that referenced this pull request Jan 29, 2026
Summary:

- Add ExportedProgramPassBase, which supports running passes on both `fx.GraphModule`s and `exir.ExportedProgram`s
- Extend this class in `_ExportPassBase` so that any passes which import directly from `ExportPass` are immediately compatible with the current pass manager.
- Create `LegacyPassWrapper` to auto-wrap passes not migrated to use ExportedProgramPassBase such that it works out of the box with EdgeProgramManager.

Differential Revision: D91725222
DrJessop pushed a commit to DrJessop/executorch that referenced this pull request Feb 6, 2026
Summary:

- Adds support to _ExportPassBase to run passes on ExportedPrograms. Ensures that we can only run either call or call_exported_program, not both
- Updates exir.PassManager to run on either exported programs or graph modules. Updates PassManagers which extend it to override the correct interfaces (minimal change, just a method renaming)
- If we run the pass manager with an exported program, supports both graph module and exported program passes, but will always return an ExportedProgramPassResult
- Updates transform to always call pass manager with an ExportedProgram, thus getting back an ExportedProgramPassResult.

Differential Revision: D91725222
@robert-kalmar
Copy link
Copy Markdown
Collaborator

CC @roman-janik-nxp , @MartinPavella

DrJessop pushed a commit to DrJessop/executorch that referenced this pull request Feb 6, 2026
Summary:

- Adds support to _ExportPassBase to run passes on ExportedPrograms. Ensures that we can only run either call or call_exported_program, not both
- Updates exir.PassManager to add a new pass manager which operates on exported programs. This is done to ensure backwards compatibility, while allowing _program transformations to use either pass manager

Differential Revision: D91725222
DrJessop pushed a commit to DrJessop/executorch that referenced this pull request Feb 7, 2026
Summary:

- Adds support to _ExportPassBase to run passes on ExportedPrograms. Ensures that we can only run either call or call_exported_program, not both
- Updates exir.PassManager to add a new pass manager which operates on exported programs. This is done to ensure backwards compatibility, while allowing _program transformations to use either pass manager

Differential Revision: D91725222
DrJessop pushed a commit to DrJessop/executorch that referenced this pull request Feb 10, 2026
Summary:

- Adds support to _ExportPassBase to run passes on ExportedPrograms. Ensures that we can only run either call or call_exported_program, not both
- Updates exir.PassManager to add a new pass manager which operates on exported programs. This is done to ensure backwards compatibility, while allowing _program transformations to use either pass manager

Differential Revision: D91725222
@robert-kalmar
Copy link
Copy Markdown
Collaborator

@DrJessop, is this PR still active?

@DrJessop
Copy link
Copy Markdown
Contributor Author

DrJessop commented Mar 4, 2026

@DrJessop, is this PR still active?

Yes it is, had to put it on the backburner for a bit, but coming back to it. Essentially, after further discussion, we would like to support not just passes on ExportedPrograms, but on EdgeProgramManagers themselves.

@DrJessop DrJessop marked this pull request as draft March 9, 2026 18:22
@meta-codesync meta-codesync bot changed the title ExportedProgram passes EdgeProgramManager passes (#16986) Mar 24, 2026
DrJessop pushed a commit to DrJessop/executorch that referenced this pull request Mar 24, 2026
Summary:

- Adds support to run to run passes on ExportedPrograms and EdgeProgramManager
- Creates an EdgeProgramManagerPassManager

Reviewed By: larryliu0820

Differential Revision: D91725222
DrJessop pushed a commit to DrJessop/executorch that referenced this pull request Mar 25, 2026
Summary:

- Adds support to run to run passes on ExportedPrograms and EdgeProgramManager
- Creates an EdgeProgramManagerPassManager

Reviewed By: larryliu0820

Differential Revision: D91725222
DrJessop pushed a commit to DrJessop/executorch that referenced this pull request Mar 25, 2026
Summary:
Pull Request resolved: pytorch#16986

- Adds support to run to run passes on ExportedPrograms and EdgeProgramManager
- Creates an EdgeProgramManagerPassManager

Reviewed By: larryliu0820

Differential Revision: D91725222
@DrJessop DrJessop force-pushed the export-D91725222 branch 2 times, most recently from 45d3898 to 4b0a9c3 Compare April 1, 2026 18:03
DrJessop pushed a commit to DrJessop/executorch that referenced this pull request Apr 1, 2026
Summary:

- Adds support to run to run passes on ExportedPrograms and EdgeProgramManager
- EdgeProgramManager transform behaves basically like a pass manager

Reviewed By: larryliu0820, ethansfng

Differential Revision: D91725222
DrJessop pushed a commit to DrJessop/executorch that referenced this pull request Apr 1, 2026
Summary:

- Adds support to run to run passes on ExportedPrograms and EdgeProgramManager
- EdgeProgramManager transform behaves basically like a pass manager

Reviewed By: larryliu0820, ethansfng

Differential Revision: D91725222
DrJessop pushed a commit to DrJessop/executorch that referenced this pull request Apr 1, 2026
Summary:

- Adds support to run to run passes on ExportedPrograms and EdgeProgramManager
- EdgeProgramManager transform behaves basically like a pass manager

Reviewed By: larryliu0820, ethansfng

Differential Revision: D91725222
DrJessop pushed a commit to DrJessop/executorch that referenced this pull request Apr 1, 2026
Summary:
Pull Request resolved: pytorch#16986

- Adds support to run to run passes on ExportedPrograms and EdgeProgramManager
- EdgeProgramManager transform behaves basically like a pass manager

Reviewed By: larryliu0820, ethansfng

Differential Revision: D91725222
DrJessop pushed a commit to DrJessop/executorch that referenced this pull request Apr 1, 2026
Summary:

- Adds support to run to run passes on ExportedPrograms and EdgeProgramManager
- EdgeProgramManager transform behaves basically like a pass manager

Reviewed By: larryliu0820, ethansfng

Differential Revision: D91725222
DrJessop pushed a commit to DrJessop/executorch that referenced this pull request Apr 1, 2026
Summary:
Pull Request resolved: pytorch#16986

- Adds support to run to run passes on ExportedPrograms and EdgeProgramManager
- EdgeProgramManager transform behaves basically like a pass manager

Reviewed By: larryliu0820, ethansfng

Differential Revision: D91725222
DrJessop pushed a commit to DrJessop/executorch that referenced this pull request Apr 13, 2026
Summary:

- Adds support to run to run passes on ExportedPrograms and EdgeProgramManager
- EdgeProgramManager transform behaves basically like a pass manager

Reviewed By: larryliu0820, ethansfng

Differential Revision: D91725222
DrJessop pushed a commit to DrJessop/executorch that referenced this pull request Apr 13, 2026
Summary:

- Adds support to run to run passes on ExportedPrograms and EdgeProgramManager
- EdgeProgramManager transform behaves basically like a pass manager

Reviewed By: larryliu0820, ethansfng

Differential Revision: D91725222
DrJessop pushed a commit to DrJessop/executorch that referenced this pull request Apr 13, 2026
Summary:
Pull Request resolved: pytorch#16986

- Adds support to run to run passes on ExportedPrograms and EdgeProgramManager
- EdgeProgramManager transform behaves basically like a pass manager

Reviewed By: larryliu0820, ethansfng

Differential Revision: D91725222
Summary:

- Adds support to run to run passes on ExportedPrograms and EdgeProgramManager
- EdgeProgramManager transform behaves basically like a pass manager

Reviewed By: larryliu0820, ethansfng

Differential Revision: D91725222
DrJessop pushed a commit to DrJessop/executorch that referenced this pull request Apr 16, 2026
Summary:

- Adds support to run to run passes on ExportedPrograms and EdgeProgramManager
- EdgeProgramManager transform behaves basically like a pass manager

Reviewed By: larryliu0820, ethansfng

Differential Revision: D91725222
DrJessop pushed a commit to DrJessop/executorch that referenced this pull request Apr 16, 2026
Summary:

- Adds support to run to run passes on ExportedPrograms and EdgeProgramManager
- EdgeProgramManager transform behaves basically like a pass manager

Reviewed By: larryliu0820, ethansfng

Differential Revision: D91725222
DrJessop pushed a commit to DrJessop/executorch that referenced this pull request Apr 16, 2026
Summary:

- Adds support to run to run passes on ExportedPrograms and EdgeProgramManager
- EdgeProgramManager transform behaves basically like a pass manager

Reviewed By: larryliu0820, ethansfng

Differential Revision: D91725222
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants