Skip to content

Qualcomm AI Engine Direct - Leave a constant op with a runtime value on CPU - #24053

Open
msluszniak wants to merge 1 commit into
pytorch:mainfrom
msluszniak:ms/qnn-constant-op-runtime-value
Open

msluszniak wants to merge 1 commit into
pytorch:mainfrom
msluszniak:ms/qnn-constant-op-runtime-value

Conversation

@msluszniak

Copy link
Copy Markdown
Contributor

Summary

full, full_like, arange and scalar_tensor are lowered as static tensors, but the support check accepted them even when a value was computed in the graph. A fill_value from .item() (YOLO's torch.full(..., stride.item())) reached torch.full in op_full as a Node and crashed partitioning with a TypeError. Such ops now stay on CPU.

Test plan

New test_passes.py::TestPasses::test_full_with_runtime_fill_value_stays_on_cpu fails on main and passes here. test_passes.py and rework/passes/test.py give the same results as main; the x86-simulator full/full_like/arange operator tests pass.

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

…on CPU

full, full_like, arange and scalar_tensor are lowered as static tensors, so they can
only be delegated when their value is known ahead of time. A fill_value computed in
the graph (YOLO's `torch.full(..., stride.item())`) reached op_full's torch.full
call as a Node and crashed the partitioner's support check.
@msluszniak
msluszniak requested a review from psiddh as a code owner October 21, 2026 08:34
@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/24053

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

❌ 4 New Failures

As of commit 7b2bf67 with merge base e6cfbf8 (image):

NEW FAILURES - The following jobs have 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 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

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