Skip to content

Qualcomm AI Engine Direct - Test a constant-only I64toI32 cast partition stays on CPU - #24051

Open
msluszniak wants to merge 1 commit into
pytorch:mainfrom
msluszniak:ms/qnn-skip-input-less-partition
Open

msluszniak wants to merge 1 commit into
pytorch:mainfrom
msluszniak:ms/qnn-skip-input-less-partition

Conversation

@msluszniak

@msluszniak msluszniak commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The partitioner fix landed in #24222, so this now only adds test_constant_only_partition_stays_on_cpu, covering an int64 buffer whose I64toI32 cast has no delegated consumer.

Test plan

The new test failed on main before #24222.

cc @cccclai @winskuo-quic @shewu-quic @haowhsu-quic @DannyYuyang-quic @cbilgin @abhinaykukkadapu @psiddh @nil-is-all

@msluszniak
msluszniak requested a review from psiddh as a code owner October 21, 2026 08:32
@pytorch-bot

pytorch-bot Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

⚠️ 15 Awaiting Approval

As of commit 7e17575 with merge base 4628b2b (image):

AWAITING APPROVAL - The following workflows need approval before CI can run:

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 Oct 21, 2026
@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.

@executorch-triage executorch-triage Bot added the community: contribution PRs coming from community (excluding hardware partners) label Oct 21, 2026
@nil-is-all nil-is-all added partner: qualcomm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Qualcomm module: qnn Issues related to Qualcomm's QNN delegate and code under backends/qualcomm/ labels Oct 21, 2026
borys3kk pushed a commit to borys3kk/swm_executorch that referenced this pull request Oct 22, 2026
A partition fed only by constants has no graph input, and QNN cannot build such a
graph ("No graph inputs present"). It happens when an int64 buffer's I64toI32 cast
is supported but the buffer's consumer is not, e.g. an index into a lookup table
with indices from an op left on CPU. Mutable buffers still count as runtime inputs.

Backport of pytorch/executorch#24051 (on top of the #23915 backport, whose orphaned-dequant filter runs first).
@nil-is-all

nil-is-all commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Tagging @qti-horodnic, @shewu-quic, @winskuo-quic, @chenweng-quic, @DannyYuyang-quic, @quic-boyuc, @qti-mmadhava, @zhaoxul-qti, @jethroqti to review. @msluszniak rebasing should resolve the unrelated CI failures. Do resolve merge conflicts as well, thanks

…ion stays on CPU

pytorch#24222 drops HTP partitions without runtime inputs. Cover the case of an
int64 buffer whose I64toI32 cast is left without a delegated consumer.
@msluszniak
msluszniak force-pushed the ms/qnn-skip-input-less-partition branch from 4507227 to 7e17575 Compare October 30, 2026 11:53
@msluszniak msluszniak changed the title Qualcomm AI Engine Direct - Leave constant-only partitions on CPU Qualcomm AI Engine Direct - Test a constant-only I64toI32 cast partition stays on CPU Oct 30, 2026
@msluszniak

Copy link
Copy Markdown
Contributor Author

Rebased. #24222 landed the same fix, so I dropped it here and kept only the test, which covers the I64toI32 cast case. Happy to close this if the existing test is enough.

This branch has not been deployed

No deployments
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. community: contribution PRs coming from community (excluding hardware partners) module: qnn Issues related to Qualcomm's QNN delegate and code under backends/qualcomm/ partner: qualcomm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Qualcomm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants