Skip to content

Commit f21ca84

Browse files
benhgleofang
andauthored
[BUG] Remove the check disabling windows support, and replace by checking for CUDA VMM API support (#1229)
* remove unnecessary disabling * trim whitespace * sync main * Update cuda_core/cuda/core/experimental/_memory.pyx Co-authored-by: Leo Fang <leo80042@gmail.com> * Leo's comments --------- Co-authored-by: Leo Fang <leo80042@gmail.com>
1 parent f223c17 commit f21ca84

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

cuda_core/cuda/core/experimental/_memory.pyx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,10 +1206,15 @@ class VirtualMemoryResource(MemoryResource):
12061206
self.config = check_or_create_options(
12071207
VirtualMemoryResourceOptions, config, "VirtualMemoryResource options", keep_none=False
12081208
)
1209-
if self.config.location_type == "host":
1209+
# Matches ("host", "host_numa", "host_numa_current")
1210+
if "host" in self.config.location_type:
12101211
self.device = None
1211-
if platform.system() == "Windows":
1212-
raise NotImplementedError("VirtualMemoryResource is not supported on Windows")
1212+
1213+
if not self.device and self.config.location_type == "device":
1214+
raise RuntimeError("VirtualMemoryResource requires a device for device memory allocations")
1215+
1216+
if self.device and not self.device.properties.virtual_memory_management_supported:
1217+
raise RuntimeError("VirtualMemoryResource requires CUDA VMM API support")
12131218

12141219
# Validate RDMA support if requested
12151220
if self.config.gpu_direct_rdma and self.device is not None:

0 commit comments

Comments
 (0)