Skip to content

Commit 4f9be79

Browse files
mdboomclaude
andcommitted
test(cuda.core): run test_alloc_memory_type_host and accept the driver's NOT_SUPPORTED
test_alloc_memory_type_host skipped on every runner because graph allocation nodes with a host pool location return CUDA_ERROR_NOT_SUPPORTED. Drivers up to CUDA 13.4 support graph allocations only in device memory: cuGraphAddMemAllocNode and stream-captured allocations from a host pool both reject HOST and HOST_NUMA locations, although host memory pools themselves are supported. Treat CUDA_ERROR_NOT_SUPPORTED as the expected current result instead of a skip, fail on any other error, and keep the round-trip check for a driver that accepts the allocation. Remove the "not currently run in any CI job" comment. Closes #3588. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 1c9ed66 commit 4f9be79

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

‎cuda_core/tests/graph/test_graph_definition.py‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,6 @@ def test_alloc_peer_access(mempool_device_x2):
926926
assert d1.device_id in node.peer_access
927927

928928

929-
# This test is not currently run in any CI job
930929
@pytest.mark.agent_authored(model="gpt-5.6-sol")
931930
def test_alloc_memory_type_host(init_cuda):
932931
"""HOST graph alloc nodes reconstruct memory_type from the driver, not the Python argument."""
@@ -942,9 +941,13 @@ def test_alloc_memory_type_host(init_cuda):
942941
try:
943942
node = g.allocate(ALLOC_SIZE, memory_type=GraphMemoryType.HOST)
944943
except CUDAError as e:
945-
if "CUDA_ERROR_NOT_SUPPORTED" in str(e):
946-
pytest.skip("Driver does not support graph alloc memory_type='host'")
947-
raise
944+
# Drivers up to and including CUDA 13.4 support graph allocations only
945+
# in device memory, as documented on GraphMemoryType.HOST. Any other
946+
# error fails the test; a driver that adds support runs the round-trip
947+
# check below instead.
948+
if "CUDA_ERROR_NOT_SUPPORTED" not in str(e):
949+
raise
950+
return
948951

949952
expected_dptr = node.dptr
950953
succ = node.record(Device().create_event())

0 commit comments

Comments
 (0)