Skip to content

Commit

Permalink
Revert "Disable the host numa virtual memory allocator for now. (dmlc…
Browse files Browse the repository at this point in the history
…#10934)"

This reverts commit f4d94a1.
  • Loading branch information
hcho3 committed Nov 17, 2024
1 parent 49eaec1 commit d3482e1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
5 changes: 0 additions & 5 deletions src/common/device_helpers.cu
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@

namespace dh {
PinnedMemory::PinnedMemory() {
// Use the `GrowOnlyPinnedMemoryImpl` as the only option for now.
// See https://github.com/dmlc/xgboost/issues/10933
this->impl_.emplace<detail::GrowOnlyPinnedMemoryImpl>();
return;

#if defined(xgboost_IS_WIN)
this->impl_.emplace<detail::GrowOnlyPinnedMemoryImpl>();
#else
Expand Down
11 changes: 8 additions & 3 deletions tests/cpp/common/test_device_vector.cu
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ class TestVirtualMem : public ::testing::TestWithParam<CUmemLocationType> {
public:
void Run() {
auto type = this->GetParam();
if (type == CU_MEM_LOCATION_TYPE_HOST_NUMA) {
GTEST_SKIP_("Host numa might require special system capabilities, skipping for now.");
}
detail::GrowOnlyVirtualMemVec vec{type};
auto prop = xgboost::cudr::MakeAllocProp(type);
auto gran = xgboost::cudr::GetAllocGranularity(&prop);
Expand Down Expand Up @@ -113,6 +110,14 @@ TEST(TestVirtualMem, Version) {
xgboost::curt::DrVersion(&major, &minor);
LOG(INFO) << "Latest supported CUDA version by the driver:" << major << "." << minor;
PinnedMemory pinned;
#if defined(xgboost_IS_WIN)
ASSERT_FALSE(pinned.IsVm());
#else // defined(xgboost_IS_WIN)
if (major >= 12 && minor >= 5) {
ASSERT_TRUE(pinned.IsVm());
} else {
ASSERT_FALSE(pinned.IsVm());
}
#endif // defined(xgboost_IS_WIN)
}
} // namespace dh

0 comments on commit d3482e1

Please sign in to comment.