Skip to content

Commit

Permalink
Update QnnWrapperUtils.cpp
Browse files Browse the repository at this point in the history
Signed-off-by: quic-zhanweiw <150764245+quic-zhanweiw@users.noreply.github.com>
  • Loading branch information
quic-zhanweiw authored Sep 16, 2024
1 parent af8f097 commit 83fc01e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/WrapperUtils/QnnWrapperUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ qnn_wrapper_api::ModelError_t qnn_wrapper_api::freeQnnTensor(Qnn_Tensor_t &tenso
if (QNN_TENSOR_GET_IS_DYNAMIC_DIMENSIONS(tensor)) {
free(QNN_TENSOR_GET_IS_DYNAMIC_DIMENSIONS(tensor));
}
auto quant = QNN_TENSOR_GET_QUANT_PARAMS(tensor);
auto encoding = quant.quantizationEncoding;
if (encoding == QNN_QUANTIZATION_ENCODING_AXIS_SCALE_OFFSET) {
if (quant.axisScaleOffsetEncoding.scaleOffset != nullptr) {
free(quant.axisScaleOffsetEncoding.scaleOffset);
}
}
return MODEL_NO_ERROR;
}

Expand Down

0 comments on commit 83fc01e

Please sign in to comment.