Skip to content

Commit 13fb145

Browse files
authored
[backport][EM] Disable the on_host option for CPU inputs. (dmlc#11333) (dmlc#11334)
1 parent b1a20d6 commit 13fb145

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/data/sparse_page_dmatrix.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ BatchSet<SparsePage> SparsePageDMatrix::GetRowBatches() {
105105
}
106106

107107
BatchSet<CSCPage> SparsePageDMatrix::GetColumnBatches(Context const *ctx) {
108-
auto id = MakeCache(this, ".col.page", on_host_, cache_prefix_, &cache_info_);
108+
auto id = MakeCache(this, ".col.page", false, cache_prefix_, &cache_info_);
109109
CHECK_NE(this->Info().num_col_, 0);
110110
this->InitializeSparsePage(ctx);
111111
if (!column_source_) {
@@ -119,7 +119,7 @@ BatchSet<CSCPage> SparsePageDMatrix::GetColumnBatches(Context const *ctx) {
119119
}
120120

121121
BatchSet<SortedCSCPage> SparsePageDMatrix::GetSortedColumnBatches(Context const *ctx) {
122-
auto id = MakeCache(this, ".sorted.col.page", on_host_, cache_prefix_, &cache_info_);
122+
auto id = MakeCache(this, ".sorted.col.page", false, cache_prefix_, &cache_info_);
123123
CHECK_NE(this->Info().num_col_, 0);
124124
this->InitializeSparsePage(ctx);
125125
if (!sorted_column_source_) {
@@ -138,11 +138,11 @@ BatchSet<GHistIndexMatrix> SparsePageDMatrix::GetGradientIndex(Context const *ct
138138
CHECK_GE(param.max_bin, 2);
139139
}
140140
detail::CheckEmpty(batch_param_, param);
141-
auto id = MakeCache(this, ".gradient_index.page", on_host_, cache_prefix_, &cache_info_);
141+
auto id = MakeCache(this, ".gradient_index.page", false, cache_prefix_, &cache_info_);
142142
if (!cache_info_.at(id)->written || detail::RegenGHist(batch_param_, param)) {
143143
this->InitializeSparsePage(ctx);
144144
cache_info_.erase(id);
145-
id = MakeCache(this, ".gradient_index.page", on_host_, cache_prefix_, &cache_info_);
145+
id = MakeCache(this, ".gradient_index.page", false, cache_prefix_, &cache_info_);
146146
LOG(INFO) << "Generating new Gradient Index.";
147147
// Use sorted sketch for approx.
148148
auto sorted_sketch = param.regen;

0 commit comments

Comments
 (0)