Qualcomm AI Engine Direct - Add fp16a8w quantization config by shewu-quic · Pull Request #19537 · pytorch/executorch · GitHub
Skip to content

Qualcomm AI Engine Direct - Add fp16a8w quantization config#19537

Merged
psiddh merged 1 commit into
pytorch:mainfrom
CodeLinaro:dev1/hutton/fp_act_quantized_weight
Jun 4, 2026
Merged

Qualcomm AI Engine Direct - Add fp16a8w quantization config#19537
psiddh merged 1 commit into
pytorch:mainfrom
CodeLinaro:dev1/hutton/fp_act_quantized_weight

Conversation

@shewu-quic

Copy link
Copy Markdown
Collaborator

Summary:

  • Add fp16a8w quantization config
    • Note that fp16a8w is only supported with Conv2d (kernel size = 1) and Linear by QNN HTP
  • Add a pass insert_cast_for_fp_act_quantized_weight.py to cast fp32 -> fp16 due to constraint in QNN HTP
  • Add a test case to run conv2d and linear with fp16a8w

Test plan

python3 backends/qualcomm/tests/test_qnn_delegate.py TestQNNFloatingPointOperator.test_qnn_backend_fp16a8w_simple_model  -b build-android -H ${HOST} -s ${DEVICE}  -m SM8750 -r /path/to/executorch -a /path/to/artifacts

@pytorch-bot

pytorch-bot Bot commented May 13, 2026

Copy link
Copy Markdown

@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 May 13, 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.

@psiddh

psiddh commented May 15, 2026

Copy link
Copy Markdown
Contributor

Summary:
- Add a pass `insert_cast_for_fp_act_quantized_weight.py` to cast fp32 -> fp16 due to constraint in QNN HTP
- Add a test case to run conv2d and linear with fp16a8w
@shewu-quic shewu-quic force-pushed the dev1/hutton/fp_act_quantized_weight branch from d69272f to a7fca32 Compare June 4, 2026 04:24
@shewu-quic shewu-quic requested a review from psiddh as a code owner June 4, 2026 04:24
@psiddh

psiddh commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

@claude review this pr

@claude

claude Bot commented Jun 4, 2026

Copy link
Copy Markdown

@psiddh psiddh merged commit c9af27e into pytorch:main Jun 4, 2026
170 of 177 checks passed
Gasoonjia pushed a commit that referenced this pull request Jun 8, 2026
### Summary:
- Add fp16a8w quantization config
- Note that fp16a8w is only supported with Conv2d (kernel size = 1) and
Linear by QNN HTP
- Add a pass `insert_cast_for_fp_act_quantized_weight.py` to cast fp32
-> fp16 due to constraint in QNN HTP
- Add a test case to run conv2d and linear with fp16a8w

### Test plan
```
python3 backends/qualcomm/tests/test_qnn_delegate.py TestQNNFloatingPointOperator.test_qnn_backend_fp16a8w_simple_model  -b build-android -H ${HOST} -s ${DEVICE}  -m SM8750 -r /path/to/executorch -a /path/to/artifacts
```
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