Browse Source

!14345 [GPU] index_add op indices tensor must be 1D

From: @tom__chen
Reviewed-by: @robingrosman,@mikef
Signed-off-by: @robingrosman
pull/14345/MERGE
mindspore-ci-bot Gitee 5 years ago
parent
commit
5312cb372e
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      mindspore/ops/operations/math_ops.py

+ 1
- 0
mindspore/ops/operations/math_ops.py View File

@@ -4600,6 +4600,7 @@ class IndexAdd(PrimitiveWithInfer):
validator.check("x rank", len(x_shape), "y rank", len(y_shape), Rel.EQ, self.name)
x_rank = len(x_shape)
validator.check_int_range(self.axis, -x_rank - 1, x_rank, Rel.INC_NEITHER, 'axis', self.name)
validator.check_equal_int(len(idx_shape), 1, "rank of idx_shape", self.name)
validator.check("size of indices", idx_shape[0], "dimension of y[axis]", y_shape[self.axis],
Rel.EQ, self.name)
axis = self.axis if self.axis >= 0 else x_rank + self.axis


Loading…
Cancel
Save