forked from mindspore-Ecosystem/mindspore
!14345 [GPU] index_add op indices tensor must be 1D
From: @tom__chen Reviewed-by: @robingrosman,@mikef Signed-off-by: @robingrosman
This commit is contained in:
commit
5312cb372e
|
@ -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…
Reference in New Issue