File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
cuda/core/experimental/system Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 1010
1111import os
1212import re
13+ import sys
1314
1415import pytest
1516from 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
3640def test_device_bar1_memory ():
Original file line number Diff line number Diff 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
6464def test_device_count ():
You can’t perform that action at this time.
0 commit comments