Skip to content

Commit 843d5ee

Browse files
authored
[EM] Make device cache more conservative. (#11547)
1 parent 231e4dd commit 843d5ee

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/data/batch_utils.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ void CheckParam(BatchParam const& init, BatchParam const& param) {
8484
cache_host_ratio = 0.0;
8585
} else {
8686
// The number of bytes that must be in the host memory.
87-
auto h_cache_nbytes = n_cache_bytes - d_cache_nbytes;
87+
auto h_cache_nbytes = n_cache_bytes - d_cache_nbytes * 0.85;
8888
cache_host_ratio = static_cast<double>(h_cache_nbytes) / static_cast<double>(n_cache_bytes);
8989
if (lc > 0) {
9090
// 0 < lc < 10, C2C is available, but with reduced link count.

src/data/ellpack_page_source.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ class EllpackHostCacheStreamImpl {
181181
new_impl->CopyInfo(old_impl);
182182

183183
// Split the cache into host cache, compressed host cache, and the device cache. We
184-
// use the decompression engin only for sparse data.
184+
// use the decompression engine only for sparse data.
185185
auto n_bytes = get_host_nbytes(old_impl);
186186
CHECK_LE(n_bytes, old_impl->gidx_buffer.size_bytes());
187187
std::size_t n_h_bytes = n_bytes, n_comp_bytes = 0;

0 commit comments

Comments
 (0)