Skip to content

[QNN] mix precision support on one qnn graph #19132

@yinrun

Description

@yinrun

🚀 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions