Skip to content

Support eq.Scalar#15792

Draft
cccclai wants to merge 1 commit intopytorch:mainfrom
cccclai:export-D86891707
Draft

Support eq.Scalar#15792
cccclai wants to merge 1 commit intopytorch:mainfrom
cccclai:export-D86891707

Conversation

@cccclai
Copy link
Copy Markdown
Contributor

@cccclai cccclai commented Nov 12, 2025

It's reported from Discord and this pattern fails to lower to QNN

class EqualFromInplaceCopyDecomp(torch.nn.Module):
    def __init__(self, hidden_size=4):
        super().__init__()
        # a small state tensor
        self.register_buffer("h", torch.zeros((1, hidden_size)))

    def forward(self, x):
        self.h[0] = x
        return self.h[0]

Differential Revision: D86891707

@cccclai cccclai requested a review from kimishpatel as a code owner November 12, 2025 23:01
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Nov 12, 2025

🔗 Helpful Links

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

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

❌ 1 New Failure

As of commit 8d9c9af with merge base 8ab589a (image):

NEW FAILURE - The following job has failed:

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 12, 2025
@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync bot commented Nov 12, 2025

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

@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: Pull Request resolved: pytorch#15792

Differential Revision: D86891707
@cccclai
Copy link
Copy Markdown
Contributor Author

cccclai commented Nov 14, 2025

@haowhsu-quic @winskuo-quic @shewu-quic @DannyYuyang-quic Hi team, I might need some help for this pattern. I managed to lower the pattern to fp, but it's failing with the quantized version. I think a copy_ node shows up in the graph indicating it's a mutable buffer. Do you know the best way moving forward with this pattern?

@winskuo-quic
Copy link
Copy Markdown
Collaborator

@haowhsu-quic @winskuo-quic @shewu-quic @DannyYuyang-quic Hi team, I might need some help for this pattern. I managed to lower the pattern to fp, but it's failing with the quantized version. I think a copy_ node shows up in the graph indicating it's a mutable buffer. Do you know the best way moving forward with this pattern?

Hi @cccclai,

I am able to reproduce the issue where I get the following graph finalize error message:
No graph inputs present for graph [0]

I believe this has to do with the behavior of run_decomposition here:

program = program.run_decompositions({})

The input node is actually not connected to the graph after run_decomposition for quantization flow, as shown in the image below. The copy_ node also disappeared.

image

On the other hand, floating point flow is working properly because the input node is still connected to the graph after run_decomposition.
image

@github-actions
Copy link
Copy Markdown

Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
If you are unable to remove the Stale label please contact a maintainer in order to do so.
If you want the bot to never mark this PR stale again, add the no-stale label.
Stale pull requests will automatically be closed after 30 days of inactivity.

@github-actions github-actions bot added the stale PRs inactive for over 60 days label Jan 14, 2026
@github-actions
Copy link
Copy Markdown

Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
If you are unable to remove the Stale label please contact a maintainer in order to do so.
If you want the bot to never mark this PR stale again, add the no-stale label.
Stale pull requests will automatically be closed after 30 days of inactivity.

@meta-cla
Copy link
Copy Markdown

meta-cla bot commented Apr 11, 2026

Hi @cccclai!

Thank you for your pull request.

We require contributors to sign our Contributor License Agreement, and yours needs attention.

You currently have a record in our system, but the CLA is no longer valid, and will need to be resubmitted.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

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 stale PRs inactive for over 60 days

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants