diff --git a/paddle/fluid/framework/ir/xpu/fc_xpu_fuse_pass.cc b/paddle/fluid/framework/ir/xpu/fc_xpu_fuse_pass.cc index 0def7069e6796bd14ea1aba5b7ec64a26202a534..c758d45622f581b35b28f8e376e1852df76d2bb2 100644 --- a/paddle/fluid/framework/ir/xpu/fc_xpu_fuse_pass.cc +++ b/paddle/fluid/framework/ir/xpu/fc_xpu_fuse_pass.cc @@ -76,6 +76,7 @@ FcXPUPattern::FcXPUPattern(PDPattern* pattern, auto* mul_w = pattern->NewNode(mul_w_repr()) ->assert_is_op_input(mul_type_, "Y") ->assert_is_persistable_var() + ->assert_has_n_outputs(1) ->assert_more([](Node* node) { return node->Var()->GetShape().size() == 2; });