From defd7ec6412e0c9d4a5761a9500f22f5b58cf438 Mon Sep 17 00:00:00 2001 From: tensor-tang Date: Thu, 16 Nov 2017 23:35:01 +0800 Subject: [PATCH] mkldnn only need one trainer --- paddle/trainer/Trainer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/paddle/trainer/Trainer.cpp b/paddle/trainer/Trainer.cpp index b68e29cd5ea..65ca2174703 100644 --- a/paddle/trainer/Trainer.cpp +++ b/paddle/trainer/Trainer.cpp @@ -137,6 +137,10 @@ void Trainer::init(const std::shared_ptr& config, } } + if (FLAGS_trainer_count > 1) { + CHECK(!FLAGS_use_mkldnn) << "MKLDNN only need 1 trainer"; + } + if (testing) { LOG(INFO) << "trainer: in testing mode"; if (config_->getOptConfig().use_sparse_remote_updater() || -- GitLab