Skip to content

Commit 4fa0bdf

Browse files
committed
remove GetBlockId
1 parent c89fa02 commit 4fa0bdf

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

paddle/fluid/framework/ir/graph_to_program_pass.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,7 @@ void GraphToProgramPass::GraphToBlock(const Graph* graph,
116116
for (ir::Node* n : graph->Nodes()) {
117117
if (n->IsVar()) {
118118
if (n->Var() && visited_vars.count(n->Var()->Name()) == 0 &&
119-
!vars2remove.count(n->Var()->Name()) &&
120-
n->GetVarNodeBlockId() == graph->GetBlockId()) {
119+
!vars2remove.count(n->Var()->Name())) {
121120
visited_vars.insert(n->Var()->Name());
122121
block->add_vars()->MergeFrom(*n->Var()->Proto());
123122
}

0 commit comments

Comments
 (0)