Qualcomm AI Engine Direct - Adding QNN backend support for as_strided core ATen op - #21987
Qualcomm AI Engine Direct - Adding QNN backend support for as_strided core ATen op#21987qti-horodnic wants to merge 1 commit into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/21987
Note: Links to docs will display an error until the docs builds have been completed. ❌ You can merge normally! (1 Unrelated Failure), 2 Unclassified FailuresAs of commit e90b748 with merge base ed7a23e ( UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:
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. |
|
@pytorchbot label "release notes: qualcomm" |
|
@claude pls review |
|
Claude finished @psiddh's task in 2m 55s —— View job PR Review: QNN backend support for
|
|
Regarding the Claude comments, 1. and 2. are the general conventions for our op decomposition implementations, will keep as-is for uniformity. |
c4fb521 to
e90b748
Compare
Summary
Added support for the
aten.as_stridedcore ATen op on the QNN backend.as_stridedcreates a view of a tensor with specifiedsize,stride, andstorage_offset. Since QNN has no nativeas_stridedop, we decompose it by:Fast path:
If strides are contiguous,
storage_offset == 0, and the output has the same number of elements as the input, replace the op with a reshape/view.General path (via module export +
merge_decomposed_graph):index_selectwith precomputed linear indices (int32constant)Test plan
Note: The fp cases in the rework fail because of a bug introduced in this pr. There is a fix pending review internally; I've tried that fix and the rework test does pass with it applied. I'll let that change go separately, adding this note here for visibility.