make check_graph choosable (#13674)

test=develop
revert-13637-optimize-opyreader
chengduo 7 years ago committed by GitHub
parent 824a82d728
commit d6747a9ac2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -156,11 +156,13 @@ ParallelExecutor::ParallelExecutor(
params, member_->local_scopes_, member_->use_cuda_); params, member_->local_scopes_, member_->use_cuda_);
#endif #endif
if (VLOG_IS_ON(5)) {
// If the loss_var_name is given, 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()) { if (loss_var_name.size()) {
PADDLE_ENFORCE_EQ(ir::GraphNum(*graph), 1, PADDLE_ENFORCE_EQ(ir::GraphNum(*graph), 1,
"The number of graph should be only one"); "The number of graph should be only one");
} }
}
if (exec_strategy.type_ == ExecutionStrategy::kDefault) { if (exec_strategy.type_ == ExecutionStrategy::kDefault) {
member_->executor_.reset(new details::ThreadedSSAGraphExecutor( member_->executor_.reset(new details::ThreadedSSAGraphExecutor(

Loading…
Cancel
Save