From 75160faf062f4dd1f84ff35d47d69660a8333e9d Mon Sep 17 00:00:00 2001 From: Hyunsu Cho Date: Wed, 23 Oct 2024 13:34:27 -0700 Subject: [PATCH] On Windows, CUDA virtual memory is not available --- tests/cpp/common/test_device_vector.cu | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/cpp/common/test_device_vector.cu b/tests/cpp/common/test_device_vector.cu index 9dff9c691c15..5264bb7cf344 100644 --- a/tests/cpp/common/test_device_vector.cu +++ b/tests/cpp/common/test_device_vector.cu @@ -10,6 +10,7 @@ #include "../../../src/common/device_helpers.cuh" // for CachingThrustPolicy, PinnedMemory #include "../../../src/common/device_vector.cuh" #include "xgboost/global_config.h" // for GlobalConfigThreadLocalStore +#include "xgboost/windefs.h" // for xgboost_IS_WIN namespace dh { TEST(DeviceUVector, Basic) { @@ -109,7 +110,7 @@ TEST(TestVirtualMem, Version) { xgboost::curt::DrVersion(&major, &minor); LOG(INFO) << "Latest supported CUDA version by the driver:" << major << "." << minor; PinnedMemory pinned; - if (major >= 12 && minor >= 5) { + if (major >= 12 && minor >= 5 && !xgboost_IS_WIN) { ASSERT_TRUE(pinned.IsVm()); } else { ASSERT_FALSE(pinned.IsVm());