You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

mssa-2021-007.patch 939 B

12345678910111213141516171819202122232425
  1. From 8359643b0ebd9d0931110bd7776080abd2f2259d Mon Sep 17 00:00:00 2001
  2. From: lzk <liuzhongkai2@huawei.com>
  3. Date: Fri, 21 May 2021 01:37:26 -0700
  4. Subject: [PATCH] common_infer bug
  5. ---
  6. .../backend/kernel_compiler/cpu/nnacl/infer/common_infer.c | 2 +-
  7. 1 file changed, 1 insertion(+), 1 deletion(-)
  8. diff --git a/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/infer/common_infer.c b/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/infer/common_infer.c
  9. index 20c15559ed..c422a9c1ab 100644
  10. --- a/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/infer/common_infer.c
  11. +++ b/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/infer/common_infer.c
  12. @@ -302,7 +302,7 @@ int ShapeInsert(int *shape, size_t *shape_size, int index, int value) {
  13. }
  14. int ShapeErase(int *shape, size_t *shape_size, int index) {
  15. - if (index < 0 && index >= *shape_size) {
  16. + if (index < 0 || index >= *shape_size) {
  17. return NNACL_ERR;
  18. }
  19. --
  20. 2.17.1