Add managed memory allocator. (#10711)

This commit is contained in:
Jiaming Yuan
2024-08-17 03:02:34 +08:00
committed by GitHub
parent 8d7fe262d9
commit ec3f327c20
5 changed files with 128 additions and 71 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::pinned_allocator<T>;
using Alloc = xgboost::common::cuda_impl::pinned_allocator<T>;
template <typename U>
using HostVector = std::vector<U, Alloc<U>>;