未验证 提交 036c0ae1 编写于 作者: H HongyuJia 提交者: GitHub

[0D-Tensor] Support isclose and polish codes (#55292)

上级 f4290a92
......@@ -230,7 +230,7 @@ create_unit_test(
create_unit_test(
TestElementwiseBinaryOp_NdTo0d, "div", paddle.divide, "builder.divide"
)
# # Paddle'atan2 only supports 0D + 0D -> 0D
# Paddle'atan2 only supports 0D + 0D -> 0D
create_unit_test(
TestElementwiseBinaryOp_0DTo0D, "atan2", paddle.atan2, "builder.atan2"
)
......@@ -465,6 +465,12 @@ create_unit_test(
"builder.less_equal",
dtype="int64",
)
create_unit_test(
TestElementwiseBinaryOp_0DTo0D,
"is_close",
paddle.isclose,
"builder.isclose",
)
######################
......@@ -608,7 +614,7 @@ class TestScaleOp(OpTest):
self.paddle_outputs = [out]
def build_cinn_program(self, target):
builder = NetBuilder("reduce_op")
builder = NetBuilder("scale_op")
x = builder.create_input(
cinn_dtype_convert(self.dtype), self.inputs["x"].shape, "x"
)
......@@ -648,7 +654,7 @@ class TestSumOp(OpTest):
self.paddle_outputs = [out]
def build_cinn_program(self, target):
builder = NetBuilder("reduce_op")
builder = NetBuilder("sum_op")
x = builder.create_input(
cinn_dtype_convert(self.dtype), self.inputs["x"].shape, "x"
)
......@@ -691,7 +697,7 @@ class TestDropoutOp(OpTest):
self.paddle_outputs = [out]
def build_cinn_program(self, target):
builder = NetBuilder("reduce_op")
builder = NetBuilder("dropout_op")
x = builder.create_input(
cinn_dtype_convert(self.dtype), self.inputs["x"].shape, "x"
)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册