Deprecate single node multi-gpu mode (#4579)

* deprecate multi-gpu training

* add single node

* add warning
This commit is contained in:
Rong Ou
2019-06-18 20:51:38 -07:00
committed by Rory Mitchell
parent 6757654337
commit e94f85f0e4
5 changed files with 16 additions and 6 deletions

View File

@@ -200,8 +200,14 @@ class LearnerImpl : public Learner {
<< " Internal Error: Always call InitModel or Load before any evaluation.";
this->ValidateDMatrix(dmat);
CHECK(this->gbm_) << " Internal: GBM is not set";
if (this->gbm_->UseGPU() && cfg_.find("n_gpus") == cfg_.cend()) {
tparam_.n_gpus = 1;
if (this->gbm_->UseGPU()) {
if (cfg_.find("n_gpus") == cfg_.cend()) {
tparam_.n_gpus = 1;
}
if (tparam_.n_gpus != 1) {
LOG(WARNING) << "Multi-GPU training is deprecated. "
"Please use distributed GPU training with one process per GPU.";
}
}
}