Skip to content

Commit 89329d9

Browse files
rparolinclaude
andcommitted
fix(test): require concurrent_managed_access for advise tests that hit real hardware
These three tests call cuMemAdvise on real CUDA devices and verify memory range attributes. On devices without concurrent_managed_access (e.g. Windows/WDDM), set_read_mostly silently no-ops and set_preferred_location fails with CUDA_ERROR_INVALID_DEVICE. Use the stricter _skip_if_managed_location_ops_unsupported guard, matching the pattern already used by test_managed_memory_functions_accept_raw_pointer_ranges. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c250c92 commit 89329d9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎cuda_core/tests/test_memory.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,7 +1207,7 @@ def test_managed_memory_prefetch_supports_managed_pool_allocations(init_cuda):
12071207

12081208
def test_managed_memory_advise_supports_external_managed_allocations(init_cuda):
12091209
device = Device()
1210-
_skip_if_managed_allocation_unsupported(device)
1210+
_skip_if_managed_location_ops_unsupported(device)
12111211
device.set_current()
12121212

12131213
buffer = DummyUnifiedMemoryResource(device).allocate(_MANAGED_TEST_ALLOCATION_SIZE)
@@ -1390,7 +1390,7 @@ def test_managed_memory_operation_validation(init_cuda):
13901390
def test_managed_memory_advise_location_validation(init_cuda):
13911391
"""Verify doc-specified location constraints for each advice kind."""
13921392
device = Device()
1393-
_skip_if_managed_allocation_unsupported(device)
1393+
_skip_if_managed_location_ops_unsupported(device)
13941394
device.set_current()
13951395

13961396
buffer = DummyUnifiedMemoryResource(device).allocate(_MANAGED_TEST_ALLOCATION_SIZE)
@@ -1422,7 +1422,7 @@ def test_managed_memory_advise_location_validation(init_cuda):
14221422
def test_managed_memory_advise_accepts_enum_value(init_cuda):
14231423
"""advise() accepts CUmem_advise enum values directly, not just string aliases."""
14241424
device = Device()
1425-
_skip_if_managed_allocation_unsupported(device)
1425+
_skip_if_managed_location_ops_unsupported(device)
14261426
device.set_current()
14271427

14281428
buffer = DummyUnifiedMemoryResource(device).allocate(_MANAGED_TEST_ALLOCATION_SIZE)

0 commit comments

Comments
 (0)