Make QuantileDMatrix default to sklearn esitmators. (#8220)
This commit is contained in:
@@ -173,8 +173,15 @@ BatchSet<EllpackPage> IterativeDMatrix::GetEllpackBatches(BatchParam const& para
|
||||
}
|
||||
if (!ellpack_ && ghist_) {
|
||||
ellpack_.reset(new EllpackPage());
|
||||
this->ctx_.gpu_id = param.gpu_id;
|
||||
this->Info().feature_types.SetDevice(param.gpu_id);
|
||||
// Evaluation QuantileDMatrix initialized from CPU data might not have the correct GPU
|
||||
// ID.
|
||||
if (this->ctx_.IsCPU()) {
|
||||
this->ctx_.gpu_id = param.gpu_id;
|
||||
}
|
||||
if (this->ctx_.IsCPU()) {
|
||||
this->ctx_.gpu_id = dh::CurrentDevice();
|
||||
}
|
||||
this->Info().feature_types.SetDevice(this->ctx_.gpu_id);
|
||||
*ellpack_->Impl() =
|
||||
EllpackPageImpl(&ctx_, *this->ghist_, this->Info().feature_types.ConstDeviceSpan());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user