Skip to content

Commit fc62237

Browse files
committed
address TCC failure
1 parent c4f065b commit fc62237

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎cuda_core/tests/memory/test_resource_live_count.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,11 @@ def test_subclass_with_init_args_is_counted(init_cuda):
8282
def test_cython_subclass_wrapper_is_counted(init_cuda):
8383
# Covers a Cython subclass with its own __cinit__: a non-owning
8484
# DeviceMemoryResource(device) wrapper (no options) wraps the default pool
85-
# and is counted and uncounted like any resource.
85+
# and is counted and uncounted like any resource. The no-options path
86+
# needs the current device's memory pool, so skip where it is unsupported
87+
# (e.g. Windows TCC); the counter behavior itself is platform-independent.
88+
if not init_cuda.properties.memory_pools_supported:
89+
pytest.skip("Device does not support memory pools")
8690
before = _live_memory_resource_count()
8791
mr = DeviceMemoryResource(init_cuda)
8892
assert _live_memory_resource_count() == before + 1

0 commit comments

Comments
 (0)