未验证 提交 41acf19b 编写于 作者: J jiangfan06 提交者: GitHub

Fix identity_op_clean_pass (#56753)

上级 5efaaaa3
......@@ -124,7 +124,14 @@ FindTwoCastOpPattern::FindTwoCastOpPattern(PDPattern* pattern,
});
auto* cast_op_1 = pattern->NewNode(cast_op_1_repr())->assert_is_op("cast");
auto* cast_op_1_out = pattern->NewNode(cast_op_1_out_repr())->assert_is_var();
auto* cast_op_1_out = pattern->NewNode(cast_op_1_out_repr())
->assert_is_var()
->assert_is_op_output("cast", "Out")
->assert_more([](Node* x) {
const auto& var_type = x->Var()->GetDataType();
return var_type != proto::VarType::INT32 &&
var_type != proto::VarType::INT64;
});
auto* cast_op_2 = pattern->NewNode(cast_op_2_repr())->assert_is_op("cast");
auto* cast_op_2_out = pattern->NewNode(cast_op_2_out_repr())->assert_is_var();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册