From 5160628c235f0dc61e2e8e867e316d0fe9583970 Mon Sep 17 00:00:00 2001 From: wenbin Date: Thu, 3 Nov 2022 11:06:41 +0800 Subject: [PATCH] bug fix (#47611) --- paddle/fluid/framework/ir/preln_residual_bias_fuse_pass.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/framework/ir/preln_residual_bias_fuse_pass.cc b/paddle/fluid/framework/ir/preln_residual_bias_fuse_pass.cc index 8af2dd2427..13b7b4ac72 100644 --- a/paddle/fluid/framework/ir/preln_residual_bias_fuse_pass.cc +++ b/paddle/fluid/framework/ir/preln_residual_bias_fuse_pass.cc @@ -155,12 +155,14 @@ int PrelnResidualBiasFusePass::ApplyPattern(ir::Graph *graph, x = gpd.mutable_pattern() ->NewNode("preln_residual_bias_fuse/x") ->AsInput() - ->assert_is_op_input("elementwise_add", "X"); + ->assert_is_op_input("elementwise_add", "X") + ->assert_var_not_persistable(); y = gpd.mutable_pattern() ->NewNode("preln_residual_bias_fuse/y") ->AsInput() - ->assert_is_op_input("elementwise_add", "Y"); + ->assert_is_op_input("elementwise_add", "Y") + ->assert_var_not_persistable(); } patterns::PrelnResidualBias fused_pattern( gpd.mutable_pattern(), "preln_residual_bias_fuse", with_bias); -- GitLab