Skip to content

Commit d6747a9

Browse files
author
chengduo
authored
make check_graph choosable (#13674)
test=develop
1 parent 824a82d commit d6747a9

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

paddle/fluid/framework/parallel_executor.cc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,12 @@ ParallelExecutor::ParallelExecutor(
156156
params, member_->local_scopes_, member_->use_cuda_);
157157
#endif
158158

159-
// If the loss_var_name is given, the number of graph should be only one.
160-
if (loss_var_name.size()) {
161-
PADDLE_ENFORCE_EQ(ir::GraphNum(*graph), 1,
162-
"The number of graph should be only one");
159+
if (VLOG_IS_ON(5)) {
160+
// If the loss_var_name is given, the number of graph should be only one.
161+
if (loss_var_name.size()) {
162+
PADDLE_ENFORCE_EQ(ir::GraphNum(*graph), 1,
163+
"The number of graph should be only one");
164+
}
163165
}
164166

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

0 commit comments

Comments
 (0)