Skip to content

Commit f793286

Browse files
Add tests for new device descriptors
1 parent 56df1cf commit f793286

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

dpctl/tests/_device_attributes_checks.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,18 @@ def check_device_type(device):
622622
assert type(dt) is dpctl.device_type
623623

624624

625+
def check_max_clock_frequency(device):
626+
freq = device.max_clock_frequency
627+
assert isinstance(freq, int)
628+
assert freq > 0
629+
630+
631+
def check_max_mem_alloc_size(device):
632+
mmas = device.max_mem_alloc_size
633+
assert isinstance(mmas, int)
634+
assert mmas > 0
635+
636+
625637
def check_global_mem_cache_type(device):
626638
gmc_ty = device.global_mem_cache_type
627639
assert type(gmc_ty) is dpctl.global_mem_cache_type
@@ -719,6 +731,8 @@ def check_global_mem_cache_line_size(device):
719731
check_global_mem_cache_type,
720732
check_global_mem_cache_size,
721733
check_global_mem_cache_line_size,
734+
check_max_clock_frequency,
735+
check_max_mem_alloc_size,
722736
]
723737

724738

0 commit comments

Comments
 (0)