Skip to content

Commit

Permalink
On Windows, CUDA virtual memory is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
hcho3 committed Oct 23, 2024
1 parent 7fc10d3 commit 75160fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/cpp/common/test_device_vector.cu
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit 75160fa

Please sign in to comment.