未验证 提交 b4f49aa1 编写于 作者: W wangxiaoning 提交者: GitHub

fix rank=1 (#51413)

上级 b642461d
......@@ -1073,7 +1073,7 @@ void ScatterNdAddInferMeta(const MetaTensor& x,
index_dims[index_dims_size - 1],
ref_dims_size));
PADDLE_ENFORCE_GE(index_dims_size,
2UL,
1UL,
phi::errors::InvalidArgument(
"The rank of Input(Index) should be greater than 1, "
"but received the rank of Input(Index) is %d.",
......
......@@ -54,7 +54,7 @@ class TestGatherNdOpWithIndex1(OpTest):
self.check_output(check_eager=False)
def test_check_grad(self):
self.check_grad(['X'], 'Out', check_eager=False)
self.check_grad(['X'], 'Out', check_eager=False, check_prim=True)
class TestGatherNdOpWithLowIndex(OpTest):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册