Skip to content

Commit

Permalink
fix bug of constant folding pass (PaddlePaddle#55556)
Browse files Browse the repository at this point in the history
  • Loading branch information
ming1753 authored and cqulilujia committed Jul 24, 2023
1 parent 21f161a commit a1ab8ad
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions paddle/fluid/framework/ir/constant_folding_pass.cc
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ void ConstantFoldingPass::ApplyImpl(ir::Graph *graph) const {
map[in_node->Name()] = 0;
if (!in_node->Var()->Persistable()) {
input_persis = false;
} else if (!in_node->inputs.empty()) {
input_persis = false;
}
}
for (auto out_node : op_node->outputs) {
Expand Down

0 comments on commit a1ab8ad

Please sign in to comment.