Implement iterative DMatrix for CPU. (#8116)

This commit is contained in:
Jiaming Yuan
2022-07-26 22:34:21 +08:00
committed by GitHub
parent 546de5efd2
commit 2c70751d1e
20 changed files with 636 additions and 190 deletions

View File

@@ -65,9 +65,6 @@ class DMatrixProxy : public DMatrix {
} else {
this->FromCudaArray(interface_str);
}
if (this->info_.num_row_ == 0) {
this->ctx_.gpu_id = Context::kCpuId;
}
#endif // defined(XGBOOST_USE_CUDA)
}
@@ -80,9 +77,11 @@ class DMatrixProxy : public DMatrix {
MetaInfo const& Info() const override { return info_; }
Context const* Ctx() const override { return &ctx_; }
bool SingleColBlock() const override { return true; }
bool EllpackExists() const override { return true; }
bool SingleColBlock() const override { return false; }
bool EllpackExists() const override { return false; }
bool GHistIndexExists() const override { return false; }
bool SparsePageExists() const override { return false; }
DMatrix* Slice(common::Span<int32_t const> /*ridxs*/) override {
LOG(FATAL) << "Slicing DMatrix is not supported for Proxy DMatrix.";
return nullptr;