Skip to content

Qualcomm AI Engine Direct - Adding QNN backend support for reflection_pad3d core ATen op - #21502

Open
qti-horodnic wants to merge 1 commit into
pytorch:mainfrom
CodeLinaro:reflection_pad3d
Open

Qualcomm AI Engine Direct - Adding QNN backend support for reflection_pad3d core ATen op#21502
qti-horodnic wants to merge 1 commit into
pytorch:mainfrom
CodeLinaro:reflection_pad3d

Conversation

@qti-horodnic

Copy link
Copy Markdown
Contributor

Summary

Added support for aten.reflection_pad3d on the QNN HTP backend via a decomposition pass into the index_select + cat operations.

Note that QNN HTP's native Pad op with MIRROR_REFLECT scheme only supports tensors up to rank 4. Since reflection_pad3d operates on 5D tensors [N, C, D, H, W], it cannot be delegated directly. Using 2d or 1d variants of this op in a decomposition is complicated, so this PR decomposes reflection_pad3d into index_select and cat, which are both fully supported at 5D rank on HTP.

This is done by:

  1. index_select to gather mirrored indices along the dimension.
  2. cat to concatenate the reflected slices with the original tensor.

Test plan

pytest backends/qualcomm/tests/rework/htp/op/v68/test.py -k "test_reflection_pad_3d" -v


python backends/qualcomm/tests/test_qnn_delegate.py TestQNNQuantizedOperator.test_qnn_backend_reflection_pad3d --soc_model SM8750 --host aisw-vm15-labsd --device 545ee4aa --build_folder build-android

python backends/qualcomm/tests/test_qnn_delegate.py TestQNNFloatingPointOperator.test_qnn_backend_reflection_pad3d --soc_model SM8750 --host aisw-vm15-labsd --device 545ee4aa --build_folder build-android

@pytorch-bot

pytorch-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

⚠️ 12 Awaiting Approval

As of commit 10f8be4 with merge base d632341 (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 Jul 30, 2026
@qti-horodnic

Copy link
Copy Markdown
Contributor Author

@pytorchbot label "release notes: qualcomm"

@pytorch-bot pytorch-bot Bot added the release notes: qualcomm Changes to the Qualcomm backend delegate label Jul 30, 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. release notes: qualcomm Changes to the Qualcomm backend delegate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant