Skip to content

Commit 1d2b50a

Browse files
committed
fix(cuda.core): unify NUMA-host-on-cu12 error wording
Two divergent error messages were rejecting NUMA-host inputs on cu12: * `_managed_location.py:44` (call boundary, primary path): "Host(numa_id=...) / Host.numa_current() require both cuda-bindings 13.0+ and a CUDA 13+ runtime driver; use Host() instead" * `_managed_memory_ops.pyx:119` (defensive Cython guard): "use Host() instead — NUMA-aware host locations (Host(numa_id=...), Host.numa_current()) require a CUDA 13 build of cuda.core" The latter wording was stale — "CUDA 13 build of cuda.core" conflates the binding-build gate with the runtime-driver gate, the exact distinction that PRs #2054 / #2064 fixed. Update the pyx-side message to match the call-boundary wording. Test regexes for the kind-rejection cases (3 sites in TestManagedBuffer) previously matched the stale wording; update them to match the unified substring `cuda-bindings 13\.0\+` so cu12 jobs pass. Fixes the CI failure of `test_advise_location_validation` / `test_operation_validation` on all CUDA 12.9.1 matrix jobs.
1 parent c63874d commit 1d2b50a

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

cuda_core/cuda/core/_memory/_managed_memory_ops.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ ELSE:
115115
if kind == "host":
116116
return -1
117117
raise RuntimeError(
118-
"use Host() instead — NUMA-aware host locations "
119-
"(Host(numa_id=...), Host.numa_current()) require a CUDA 13 build of cuda.core"
118+
"Host(numa_id=...) / Host.numa_current() require both cuda-bindings 13.0+ "
119+
"and a CUDA 13+ runtime driver; use Host() instead"
120120
)
121121

122122

cuda_core/tests/memory/test_managed_ops.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ def test_operation_validation(self, managed_buffer):
476476
# rejected at the boundary first (TypeError).
477477
with pytest.raises(
478478
(ValueError, TypeError),
479-
match="does not support location_type='host_numa'|require a CUDA 13 build",
479+
match=r"does not support location_type='host_numa'|cuda-bindings 13\.0\+",
480480
):
481481
buf.accessed_by.add(Host(numa_id=_INVALID_HOST_DEVICE_ORDINAL))
482482

@@ -495,13 +495,13 @@ def test_advise_location_validation(self, location_ops_device, external_managed_
495495
# accessed_by rejects host_numa (CUDA 13: kind check; CUDA 12: boundary)
496496
with pytest.raises(
497497
(ValueError, TypeError),
498-
match="does not support location_type='host_numa'|require a CUDA 13 build",
498+
match=r"does not support location_type='host_numa'|cuda-bindings 13\.0\+",
499499
):
500500
buf.accessed_by.add(Host(numa_id=0))
501501

502502
# accessed_by rejects host_numa_current (same reasoning)
503503
with pytest.raises(
504504
(ValueError, TypeError),
505-
match="does not support location_type='host_numa_current'|require a CUDA 13 build",
505+
match=r"does not support location_type='host_numa_current'|cuda-bindings 13\.0\+",
506506
):
507507
buf.accessed_by.add(Host.numa_current())

0 commit comments

Comments
 (0)