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 authored and hcho3 committed Nov 15, 2024
1 parent b65e2cc commit f4d94a1
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 @@ -31,6 +31,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 @@ -110,14 +113,6 @@ 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 f4d94a1

Please sign in to comment.