Skip to content

Commit be61180

Browse files
committed
Fix tests for CUDA 13.0
1 parent 27f7a62 commit be61180

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

cuda_core/cuda/core/experimental/system/utils.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ cpdef str format_bytes(uint64_t x):
2020
return f"{x / 1024**4:.2f} TiB"
2121

2222

23-
cpdef list[int] unpack_bitmask(x: list[int]):
23+
cpdef list[int] unpack_bitmask(x: list[int] | array.array):
2424
"""
2525
Unpack a list of integers containing bitmasks.
2626

cuda_core/tests/system/test_system_device.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
import os
1212
import re
13+
import sys
1314

1415
import pytest
1516
from cuda.bindings import _nvml as nvml
@@ -30,7 +31,10 @@ def test_device_architecture():
3031
device_arch = device.architecture
3132

3233
assert isinstance(device_arch, system_device.DeviceArchitecture)
33-
assert device_arch.id in nvml.DeviceArch
34+
if sys.version_info < (3, 12):
35+
assert device_arch.id in nvml.DeviceArch.__members__.values()
36+
else:
37+
assert device_arch.id in nvml.DeviceArch
3438

3539

3640
def test_device_bar1_memory():

cuda_core/tests/system/test_system_system.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def test_get_process_name():
5858
pytest.skip("Process not found")
5959

6060
assert isinstance(process_name, str)
61-
assert b"python" in process_name
61+
assert "python" in process_name
6262

6363

6464
def test_device_count():

0 commit comments

Comments
 (0)