Skip to content

Bind lifted constants in QNN selectively lowered submodules (#25424) - #25424

Merged
psiddh merged 1 commit into
pytorch:mainfrom
psiddh:export-D133767623
Nov 23, 2026
Merged

psiddh merged 1 commit into
pytorch:mainfrom
psiddh:export-D133767623

Conversation

@psiddh

@psiddh psiddh commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary:

Selective QNN lowering can introduce lifted constants after ConstantFolding, but its parent graph still supplies the original user arguments. Installing the raw exported graph then breaks strict re-export with missing required positional argument: embedding_2.

Install the bound ExportedProgram.module() and restore plain FX code generation so constants remain bound and fused submodules keep their flat output tuples. Existing getitem(0) handling is unchanged. Add a regression covering CPU embeddings, a folded constant, strict re-export with the original arguments, and both single- and multiple-output partitions. ConstantFolding and its existing safeguards remain enabled.

Differential Revision: D133767623

Copilot AI balanced review requested due to automatic review settings November 21, 2026 21:32
@pytorch-bot

pytorch-bot Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

⏳ No Failures, 1 Pending

As of commit 1fdeb91 with merge base 8c3f75d (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 Nov 21, 2026
@meta-codesync

meta-codesync Bot commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

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

…25424)

Summary:

Selective QNN lowering can introduce lifted constants after ConstantFolding, but its parent graph still supplies the original user arguments. Installing the raw exported graph then breaks strict re-export with `missing required positional argument: embedding_2`.

Install the bound `ExportedProgram.module()` and restore plain FX code generation so constants remain bound and fused submodules keep their flat output tuples. Existing `getitem(0)` handling is unchanged. Add a regression covering CPU embeddings, a folded constant, strict re-export with the original arguments, and both single- and multiple-output partitions. ConstantFolding and its existing safeguards remain enabled.

Differential Revision: D133767623
@meta-codesync meta-codesync Bot changed the title Bind lifted constants in QNN selectively lowered submodules Bind lifted constants in QNN selectively lowered submodules (#25424) Nov 21, 2026
Copilot AI balanced review requested due to automatic review settings November 21, 2026 21:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@psiddh

psiddh commented Nov 21, 2026

Copy link
Copy Markdown
Contributor Author

cc @winskuo-quic

@winskuo-quic winskuo-quic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. Thanks for the fix.

@psiddh
psiddh merged commit 799098d into pytorch:main Nov 23, 2026
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. meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants