Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable the host numa virtual memory allocator for now. #10934

Merged
merged 1 commit into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading