[EM] Avoid resizing host cache. (#10734)

* [EM] Avoid resizing host cache.

- Add SAM allocator and resource.
- Use page-based cache instead of stream-based cache.
This commit is contained in:
Jiaming Yuan
2024-08-23 06:34:01 +08:00
committed by GitHub
parent dbfafd8557
commit 55aef8f546
16 changed files with 264 additions and 146 deletions

View File

@@ -132,7 +132,7 @@ class DataIteratorProxy {
bool cache_on_host_{true}; // TODO(Bobby): Make this optional.
template <typename T>
using Alloc = xgboost::common::cuda_impl::pinned_allocator<T>;
using Alloc = xgboost::common::cuda_impl::PinnedAllocator<T>;
template <typename U>
using HostVector = std::vector<U, Alloc<U>>;