Skip to content

Allow passes to operate on unlifted graph modules (#19674)#19674

Open
DrJessop wants to merge 1 commit into
pytorch:mainfrom
DrJessop:export-D105637321
Open

Allow passes to operate on unlifted graph modules (#19674)#19674
DrJessop wants to merge 1 commit into
pytorch:mainfrom
DrJessop:export-D105637321

Conversation

@DrJessop
Copy link
Copy Markdown
Contributor

@DrJessop DrJessop commented May 19, 2026

Summary:

EdgeProgramManager.transform assumed that we were applying passes to graph modules which couldn't modify constants. Added functionality to transform to lower constants into the graph module before running passes, and then lift them back at the end. So far, this is done by opting in to minimize the surface area of tests that would be affected by this, but could eventually become the default.

Reviewed By: ethansfng

Differential Revision: D105637321

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented May 19, 2026

🔗 Helpful Links

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

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:

✅ You can merge normally! (1 Unrelated Failure)

As of commit 383e934 with merge base 3d86cc7 (image):

FLAKY - The following job failed but was likely due to flakiness present on trunk:

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

meta-codesync Bot commented May 19, 2026

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

@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.

Summary:

EdgeProgramManager.transform assumed that we were applying passes to graph modules which couldn't modify constants. Added functionality to transform to lower constants into the graph module before running passes, and then lift them back at the end. So far, this is done by opting in to minimize the surface area of tests that would be affected by this, but could eventually become the default.

Reviewed By: ethansfng

Differential Revision: D105637321
@meta-codesync meta-codesync Bot changed the title Allow passes to operate on unlifted graph modules Allow passes to operate on unlifted graph modules (#19674) May 19, 2026
@DrJessop DrJessop force-pushed the export-D105637321 branch from ade289c to 383e934 Compare May 19, 2026 22:05
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.

2 participants