Browse Source

!8123 [MSLITE][Develop] fix bug of arm32 fp32 cpu op: topk

Merge pull request !8123 from yangruoqi713/lite
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
fa859cf1a5
1 changed files with 8 additions and 2 deletions
  1. +8
    -2
      mindspore/lite/nnacl/fp32/topk.c

+ 8
- 2
mindspore/lite/nnacl/fp32/topk.c View File

@@ -22,8 +22,11 @@ int DescendCmp(const void *a, const void *b) {
return 1; return 1;
} else if (sub < 0) { } else if (sub < 0) {
return -1; return -1;
}
if (((const TopkNode *)a)->index > ((const TopkNode *)b)->index) {
return 1;
} else { } else {
return 0;
return -1;
} }
} }


@@ -33,8 +36,11 @@ int AscendCmp(const void *a, const void *b) {
return 1; return 1;
} else if (sub < 0) { } else if (sub < 0) {
return -1; return -1;
}
if (((const TopkNode *)a)->index > ((const TopkNode *)b)->index) {
return -1;
} else { } else {
return 0;
return 1;
} }
} }




Loading…
Cancel
Save