Skip to content

Commit ce6062a

Browse files
Added checks for native_vector_width_* descriptor properties
1 parent 336cc9a commit ce6062a

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

dpctl/tests/_device_attributes_checks.py

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,55 @@ def check_preferred_vector_width_half(device):
378378
pytest.fail("preferred_vector_width_half call failed")
379379

380380

381+
def check_native_vector_width_char(device):
382+
try:
383+
device.native_vector_width_char
384+
except Exception:
385+
pytest.fail("native_vector_width_char call failed")
386+
387+
388+
def check_native_vector_width_short(device):
389+
try:
390+
device.native_vector_width_short
391+
except Exception:
392+
pytest.fail("native_vector_width_short call failed")
393+
394+
395+
def check_native_vector_width_int(device):
396+
try:
397+
device.native_vector_width_int
398+
except Exception:
399+
pytest.fail("native_vector_width_int call failed")
400+
401+
402+
def check_native_vector_width_long(device):
403+
try:
404+
device.native_vector_width_long
405+
except Exception:
406+
pytest.fail("native_vector_width_long call failed")
407+
408+
409+
def check_native_vector_width_float(device):
410+
try:
411+
device.native_vector_width_float
412+
except Exception:
413+
pytest.fail("native_vector_width_float call failed")
414+
415+
416+
def check_native_vector_width_double(device):
417+
try:
418+
device.native_vector_width_double
419+
except Exception:
420+
pytest.fail("native_vector_width_double call failed")
421+
422+
423+
def check_native_vector_width_half(device):
424+
try:
425+
device.native_vector_width_half
426+
except Exception:
427+
pytest.fail("native_vector_width_half call failed")
428+
429+
381430
def check_create_sub_devices_equally(device):
382431
try:
383432
n = int(device.max_compute_units / 2)

0 commit comments

Comments
 (0)