From e943f4508b8a6917fc360b9d29755ad9d6a89602 Mon Sep 17 00:00:00 2001 From: chengduo Date: Tue, 23 Oct 2018 20:19:14 +0800 Subject: [PATCH] add graph number check (#14025) test=develop --- paddle/fluid/framework/parallel_executor.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/paddle/fluid/framework/parallel_executor.cc b/paddle/fluid/framework/parallel_executor.cc index 093108cb547..3368ae2ee4c 100644 --- a/paddle/fluid/framework/parallel_executor.cc +++ b/paddle/fluid/framework/parallel_executor.cc @@ -156,12 +156,10 @@ ParallelExecutor::ParallelExecutor( params, member_->local_scopes_, member_->use_cuda_); #endif - if (VLOG_IS_ON(5)) { - // If the loss_var_name is given, the number of graph should be only one. - if (loss_var_name.size()) { - PADDLE_ENFORCE_EQ(ir::GraphNum(*graph), 1, - "The number of graph should be only one"); - } + // If the loss_var_name is given, the number of graph should be only one. + if (loss_var_name.size()) { + PADDLE_ENFORCE_EQ(ir::GraphNum(*graph), 1, + "The number of graph should be only one"); } if (exec_strategy.type_ == ExecutionStrategy::kDefault) { -- GitLab