mllm icon indicating copy to clipboard operation
mllm copied to clipboard

how to upgrade qnn to 2.23.1.240531 to support v79

Open yufeiy opened this issue 1 year ago • 2 comments

model.layers.0.self_attn.ires_split-00_view_is QNN INT8 op 0.0ms [ ERROR ] <E> Tensor name InceptionV3_InceptionV3_Conv2d_1a_3x3_Conv2D_stride already exists in the graph.

[ ERROR ] QnnModel::addTensor() Creating tensor for node: model.layers.0.self_attn.k_proj.linearint8, tensorName: InceptionV3_InceptionV3_Conv2d_1a_3x3_Conv2D_stride. [ ERROR ] QnnModel::addNode() addTensor() failed for tensor param InceptionV3_InceptionV3_Conv2d_1a_3x3_Conv2D_stride on node model.layers.0.self_attn.k_proj.linearint8. [ ERROR ] qnnModels_[qnnModelIndex_].addNode( QNN_OPCONFIG_VERSION_1, name.c_str(), packageName.c_str(), nodeType.c_str(), paramsPtr, params.size(), inputTensorNames, inputTensorNames.size(), outputTensors.data(), outputTensors.size() ) expected MODEL_NO_ERROR, got MODEL_TENSOR_ERROR

when build htp_v79 using qnn 2.23.1.240531 with latest Hexagon SDK(6.1.0.1), there is above tensor name conflict issue. How can we fix it for qnn upgrading?

yufeiy avatar Nov 06 '24 06:11 yufeiy

Hi,

Thank you for your attention on the mllm and for providing this issue. In the earlier version of QNN 2.20, it was possible for LinearINT8 parameter names to have duplicates. However, it seems this is no longer allowed starting with version qnn 2.23.

To resolve this issue, you can reassign a unique name to InceptionV3_InceptionV3_Conv2d_1a_3x3_Conv2D_stride by renaming it according to the linear naming convention. For instance, you could rename it to something like layer.0.q_proj.InceptionV3_InceptionV3_Conv2d_1a_3x3_Conv2D_stride.

Additionally, we are currently working on updates to support htp_v79, which will include the latest versions of QNN and Hexagon SDK (6.1.0.1). Stay tuned for more updates.

Thank you for your patience and understanding. If you have any more questions or need further assistance, feel free to ask!

liang1232018 avatar Nov 09 '24 07:11 liang1232018

Thanks for your response and comments. But even we rename it with liner naming convention like layer.0.q_proj.InceptionV3_InceptionV3_Conv2d_1a_3x3_Conv2D_stride, the issue was still reproduced as below:

model.layers.0.self_attn.ires_split-00_view_is QNN INT8 op 0.0ms [ ERROR ] <E> Tensor name layer.0.q_proj.InceptionV3_InceptionV3_Conv2d_1a_3x3_Conv2D_stride already exists in the graph.

[ ERROR ] QnnModel::addTensor() Creating tensor for node: model.layers.0.self_attn.k_proj.linearint8, tensorName: layer.0.q_proj.InceptionV3_InceptionV3_Conv2d_1a_3x3_Conv2D_stride. [ ERROR ] QnnModel::addNode() addTensor() failed for tensor param layer.0.q_proj.InceptionV3_InceptionV3_Conv2d_1a_3x3_Conv2D_stride on node model.layers.0.self_attn.k_proj.linearint8. [ ERROR ] qnnModels_[qnnModelIndex_].addNode( QNN_OPCONFIG_VERSION_1, name.c_str(), packageName.c_str(), nodeType.c_str(), paramsPtr, params.size(), inputTensorNames, inputTensorNames.size(), outputTensors.data(), outputTensors.size() ) expected MODEL_NO_ERROR, got MODEL_TENSOR_ERROR

yufeiy avatar Nov 11 '24 03:11 yufeiy