From 07d8f97b120704a8c622467413f4f434b0cac42c Mon Sep 17 00:00:00 2001 From: cc <52520497+juncaipeng@users.noreply.github.com> Date: Tue, 28 Apr 2020 21:12:19 +0800 Subject: [PATCH] Not fuse two scale in the same time, test=develop (#3528) --- lite/core/mir/elimination/identity_scale_eliminate_pass.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lite/core/mir/elimination/identity_scale_eliminate_pass.cc b/lite/core/mir/elimination/identity_scale_eliminate_pass.cc index 345361047b..2e522214bf 100644 --- a/lite/core/mir/elimination/identity_scale_eliminate_pass.cc +++ b/lite/core/mir/elimination/identity_scale_eliminate_pass.cc @@ -26,7 +26,9 @@ class Eliminator : public FuseBase { public: void BuildPattern() override { // the previous op's output need updat - auto* pre_op = OpNode("preop")->assert_is_not_op_type("conditional_block"); + auto* pre_op = OpNode("preop") + ->assert_is_not_op_type("conditional_block") + ->assert_is_not_op_type("scale"); // TODO(Superjomn) check has only one output auto* x = VarNode("x")->assert_is_op_input("scale", "X"); auto* scale_op = OpNode("scale", "scale") -- GitLab