Skip to content

Commit 2699ff1

Browse files
committed
Use per device device MR, add numpy requirement to test
1 parent 0b2e207 commit 2699ff1

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

cuda_core/examples/memory_ops.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
from cuda.core.experimental import (
2121
Device,
22-
DeviceMemoryResource,
2322
LaunchConfig,
2423
LegacyPinnedMemoryResource,
2524
Program,
@@ -62,7 +61,7 @@
6261
kernel = mod.get_kernel("memory_ops")
6362

6463
# Create different memory resources
65-
device_mr = DeviceMemoryResource(dev.device_id)
64+
device_mr = dev.memory_resource
6665
pinned_mr = LegacyPinnedMemoryResource()
6766

6867
# Allocate different types of memory

cuda_core/tests/test_launcher.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,13 @@ def test_cooperative_launch():
212212
"memory_resource_class",
213213
[
214214
DeviceMemoryResource,
215-
LegacyPinnedMemoryResource,
215+
pytest.param(
216+
LegacyPinnedMemoryResource,
217+
marks=pytest.mark.skipif(
218+
tuple(int(i) for i in np.__version__.split(".")[:3]) < (2, 2, 5),
219+
reason="need numpy 2.2.5+, numpy GH #28632",
220+
),
221+
),
216222
],
217223
)
218224
def test_launch_with_buffers_allocated_by_memory_resource(init_cuda, memory_resource_class):

0 commit comments

Comments
 (0)