Browse Source

!8381 【MSLITE】fix dequant memory bug

From: @guohonhzilonghw
Reviewed-by: @zhang_xue_tong,@ddwsky
Signed-off-by: @zhang_xue_tong
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
373132adef
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      mindspore/lite/src/runtime/kernel/arm/base/dequant.h

+ 3
- 3
mindspore/lite/src/runtime/kernel/arm/base/dequant.h View File

@@ -122,9 +122,9 @@ class DequantUtil {
uint_result = 0;
(*count)++;
}
if (is_last) {
int remainder = unpack_bit_data->size();
for (int i = 0; i < remainder; i++) {
size_t remainder = unpack_bit_data->size();
if (is_last && remainder > 0) {
for (size_t i = 0; i < remainder; i++) {
bool bit = unpack_bit_data->front();
uint_result = (static_cast<int>(bit) << i) + uint_result;
unpack_bit_data->pop();


Loading…
Cancel
Save