Skip to content

Qualcomm AI Engine Direct - Fixed Conv2d + PReLu fusion issue#19014

Open
shewu-quic wants to merge 1 commit intopytorch:mainfrom
CodeLinaro:dev1/hutton/make_conv_prelu_fusion_by_htp
Open

Qualcomm AI Engine Direct - Fixed Conv2d + PReLu fusion issue#19014
shewu-quic wants to merge 1 commit intopytorch:mainfrom
CodeLinaro:dev1/hutton/make_conv_prelu_fusion_by_htp

Conversation

@shewu-quic
Copy link
Copy Markdown
Collaborator

Summary:

  • There is a constraint to fuse Conv2d and PRelu
    • the coefficient must be a scalar (1x1x1x1) or (1x1x1xd) for fusion, and it will be broadcasted by QNN HTP.
    • The htp_arch is greater than 73
    • The H and W of weight shape is less than 8
  • Add the test cases to check the fusion is successful

Test Plan:

python backends/qualcomm/tests/test_qnn_delegate.py TestQNNQuantizedModel.test_qnn_backend_conv2d_leaky_relu_fusion -H {HOST} -s {SERIAL} -m SM8750 -b build-android -a /path/to/executorch_artifacts

python backends/qualcomm/tests/test_qnn_delegate.py TestQNNQuantizedModel.test_qnn_backend_conv2d_relu_fusion -H {HOST} -s {SERIAL} -m SM8750 -b build-android -a /path/to/executorch_artifacts

python backends/qualcomm/tests/test_qnn_delegate.py TestQNNQuantizedModel.test_qnn_backend_linear_leaky_relu_fusion -H {HOST} -s {SERIAL} -m SM8750 -b build-android -a /path/to/executorch_artifacts

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Apr 21, 2026

🔗 Helpful Links

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

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

✅ You can merge normally! (2 Unrelated Failures)

As of commit d1cb046 with merge base 2d53535 (image):

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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 Apr 21, 2026
@shewu-quic shewu-quic marked this pull request as draft April 21, 2026 01:34
@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.

@shewu-quic shewu-quic force-pushed the dev1/hutton/make_conv_prelu_fusion_by_htp branch from e61a691 to edac71b Compare April 21, 2026 01:47
@shewu-quic shewu-quic marked this pull request as ready for review April 21, 2026 01:48
@abhinaykukkadapu
Copy link
Copy Markdown
Contributor

@shewu-quic can you rebase the diff, wondering why the newly added buck and pass tests are failing specifically on this diff.

Summary:
- There is a constraint that the coefficient must be a scalar (1x1x1x1) or (1x1x1xd) for fusion, and it will be broadcasted by QNN.
- Add the test cases to check the fusion is successful

Test Plan:
```
python backends/qualcomm/tests/test_qnn_delegate.py           TestQNNQuantizedModel.test_qnn_backend_activation_fusion -H {HOST} -s {SERIAL} -m SM8750 -b build-android -a /path/to/executorch_artifacts
```

fixed
@shewu-quic shewu-quic force-pushed the dev1/hutton/make_conv_prelu_fusion_by_htp branch from edac71b to d1cb046 Compare April 21, 2026 23:20
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants