From d3482e1b6d67698de299dc153cb6441f1c798d9b Mon Sep 17 00:00:00 2001 From: Hyunsu Cho Date: Sun, 17 Nov 2024 02:19:16 -0800 Subject: [PATCH] Revert "Disable the host numa virtual memory allocator for now. (#10934)" This reverts commit f4d94a19b903d4bfd6458b90f0f8201616f2765d. --- src/common/device_helpers.cu | 5 ----- tests/cpp/common/test_device_vector.cu | 11 ++++++++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/common/device_helpers.cu b/src/common/device_helpers.cu index 01e81b16ee0b..608a535cd8cb 100644 --- a/src/common/device_helpers.cu +++ b/src/common/device_helpers.cu @@ -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(); - return; - #if defined(xgboost_IS_WIN) this->impl_.emplace(); #else diff --git a/tests/cpp/common/test_device_vector.cu b/tests/cpp/common/test_device_vector.cu index ec1a420bd349..d7a03e41a64b 100644 --- a/tests/cpp/common/test_device_vector.cu +++ b/tests/cpp/common/test_device_vector.cu @@ -31,9 +31,6 @@ class TestVirtualMem : public ::testing::TestWithParam { 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); @@ -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