Skip to content

Commit 23a674c

Browse files
committed
switch the flag
1 parent defd7ec commit 23a674c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

paddle/trainer/Trainer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ void Trainer::init(const std::shared_ptr<TrainerConfigHelper>& config,
137137
}
138138
}
139139

140-
if (FLAGS_trainer_count > 1) {
141-
CHECK(!FLAGS_use_mkldnn) << "MKLDNN only need 1 trainer";
140+
if (FLAGS_use_mkldnn) {
141+
CHECK_EQ(FLAGS_trainer_count, 1UL) << "MKLDNN only need 1 trainer";
142142
}
143143

144144
if (testing) {

0 commit comments

Comments
 (0)