diff --git a/lite/core/mir/elimination/identity_scale_eliminate_pass.cc b/lite/core/mir/elimination/identity_scale_eliminate_pass.cc index 345361047bbbad68cdd0b298a163214cbfe114fc..2e522214bfa301c488700dde06b98e0ad8ff3940 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")