Skip to content

Commit

Permalink
Disable the host numa virtual memory allocator for now. (dmlc#10934)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Nov 5, 2024
1 parent 6ba451d commit c0c3b21
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
5 changes: 5 additions & 0 deletions src/common/device_helpers.cu
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@

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: 3 additions & 8 deletions tests/cpp/common/test_device_vector.cu
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ 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 @@ -111,15 +114,7 @@ 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)
}

TEST(AtomitFetch, Max) {
Expand Down

0 comments on commit c0c3b21

Please sign in to comment.