[QNN] mix precision support on one qnn graph
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5k
- Forks
- 1.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 581
Description
🚀 The feature, motivation and pitch
Does QNN backend or SDK support mixed precision, which meax I hope in one graph, some calculation is based on uint, some on float16. I was doing some experiments and got the failures as follows. I spend a lot of time on it but didn't figure it oure.
INFO:executorch.backends.qualcomm.qnn_preprocess:Visiting: aten_div_tensor, aten.div.Tensor
INFO:executorch.backends.qualcomm.qnn_preprocess:Visiting: aten_div_tensor_1, aten.div.Tensor
INFO:executorch.backends.qualcomm.qnn_preprocess:Visiting: aten_permute_copy_default_7, aten.permute_copy.default
INFO:executorch.backends.qualcomm.qnn_preprocess:Visiting: aten_permute_copy_default_8, aten.permute_copy.default
INFO:executorch.backends.qualcomm.qnn_preprocess:Visiting: aten_mul_tensor_3, aten.mul.Tensor
[ERROR] [Qnn ExecuTorch]: graph_prepare.cc:224::ERROR:could not create op: q::reduce_sum.fp16.tcm.crouton
[ERROR] [Qnn ExecuTorch]: graph_prepare.cc:226::ERROR:Op creation failure, op id=0x108f000000c9 (q::reduce_sum.fp16.tcm.crouton) total_inputs=2
[ERROR] [Qnn ExecuTorch]: graph_prepare.cc:212: Input 0: id=[0x110f000000c5] op=[Power@t*5] output0=[14ConcreteTensorIN5Tdefs12PlainFloat16EE]
[ERROR] [Qnn ExecuTorch]: graph_prepare.cc:212: Input 1: id=[0xc8] op=[Const] output0=[14ConcreteTensorIN5Tdefs5Int32EE]
[ERROR] [Qnn ExecuTorch]: graph_prepare.cc:1672::ERROR:Op 0x108f000000c9 preparation failed with err:-1
[ERROR] [Qnn ExecuTorch]: <E> "aten_mul_tensor" generated: could not create op
[ERROR] [Qnn ExecuTorch]: <E> "aten_slice_copy_tensor_1" generated: could not create op
[ERROR] [Qnn ExecuTorch]: <E> "aten_add_tensor" generated: could not create op
[ERROR] [Qnn ExecuTorch]: <E> "aten_mul_tensor_3" generated: could not create op
[ERROR] [Qnn ExecuTorch]: <E> "aten_add_tensor_1" generated: could not create op
[ERROR] [Qnn ExecuTorch]: <E> "aten_add_tensor_2" generated: could not create op
[ERROR] [Qnn ExecuTorch]: <E> "aten_add_tensor" generated: could not create op
[ERROR] [Qnn ExecuTorch]: <E> "aten_sum_dim_int_list" generated: could not create op
[ERROR] [Qnn ExecuTorch]: <E> RouterX86 graph prepare failed 12
[ERROR] [Qnn ExecuTorch]: <E> Failed to finalize graph (id: 1) with err 1002
[ERROR] [Qnn ExecuTorch]: Failed to finalize Qnn Graph with error: 1002
[ERROR] [Qnn ExecuTorch]: Fail to compile QNN graph
Alternatives
No response
Additional context
No response
RFC (Optional)
No response
cc @cccclai @cbilgin @abhinaykukkadapu
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the QNN backend/SDK graph preparation path described in the report, especially the reduce_sum.fp16.tcm.crouton creation failure and mixed uint/float16 inputs. Determine whether one QNN graph is expected to support these precisions together and identify the smallest reproducible case; done means the support limitation or required implementation scope is documented with a passing reproduction or test.
Written by the indexing model from the issue text.
Assessment
- Domain
- embedded-iot, machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100