Skip to content

Commit

Permalink
Merge pull request PaddlePaddle#5715 from tensor-tang/check
Browse files Browse the repository at this point in the history
mkldnn only need one trainer
  • Loading branch information
luotao1 authored Nov 17, 2017
2 parents c808fbb + 23a674c commit ba9f252
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions paddle/trainer/Trainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ void Trainer::init(const std::shared_ptr<TrainerConfigHelper>& config,
}
}

if (FLAGS_use_mkldnn) {
CHECK_EQ(FLAGS_trainer_count, 1UL) << "MKLDNN only need 1 trainer";
}

if (testing) {
LOG(INFO) << "trainer: in testing mode";
if (config_->getOptConfig().use_sparse_remote_updater() ||
Expand Down

0 comments on commit ba9f252

Please sign in to comment.