Skip to content

Commit 1ea0195

Browse files
authored
Merge pull request #14145 from chengduoZH/disable_GraphNum_Check_release
Disable GraphNum_Check
2 parents d4908cc + a8d1cb0 commit 1ea0195

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

paddle/fluid/framework/parallel_executor.cc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,13 @@ ParallelExecutor::ParallelExecutor(
158158
var_infos.back().persistable_ = node->Var()->Persistable();
159159
}
160160
}
161-
// If the loss_var_name is given, the number of graph should be only one.
162-
if (loss_var_name.size()) {
163-
PADDLE_ENFORCE_EQ(ir::GraphNum(*graph), 1,
164-
"The number of graph should be only one");
161+
162+
if (VLOG_IS_ON(5)) {
163+
// If the loss_var_name is given, the number of graph should be only one.
164+
if (loss_var_name.size()) {
165+
PADDLE_ENFORCE_EQ(ir::GraphNum(*graph), 1,
166+
"The number of graph should be only one");
167+
}
165168
}
166169

167170
if (exec_strategy.type_ == ExecutionStrategy::kDefault) {

0 commit comments

Comments
 (0)