Skip to content

Commit 7c10468

Browse files
updated tests to use partition= keyword
1 parent cf47979 commit 7c10468

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

dpctl/tests/test_sycl_device.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ def check_get_preferred_vector_width_half(device):
300300
def check_create_sub_devices_equally(device):
301301
try:
302302
n = int(device.max_compute_units / 2)
303-
device.create_sub_devices(n)
303+
device.create_sub_devices(partition=n)
304304
except SubDeviceCreationError:
305305
pytest.skip("create_sub_devices can't create sub-devices on this device")
306306
except Exception:
@@ -310,7 +310,7 @@ def check_create_sub_devices_equally(device):
310310
def check_create_sub_devices_by_counts(device):
311311
try:
312312
n = device.max_compute_units / 2
313-
device.create_sub_devices([n, n])
313+
device.create_sub_devices(partition=(n, n))
314314
except SubDeviceCreationError:
315315
pytest.skip("create_sub_devices can't create sub-devices on this device")
316316
except Exception:
@@ -319,7 +319,7 @@ def check_create_sub_devices_by_counts(device):
319319

320320
def check_create_sub_devices_by_affinity_not_applicable(device):
321321
try:
322-
device.create_sub_devices("not_applicable")
322+
device.create_sub_devices(partition="not_applicable")
323323
except SubDeviceCreationError:
324324
pytest.skip("create_sub_devices can't create sub-devices on this device")
325325
except Exception:
@@ -328,7 +328,7 @@ def check_create_sub_devices_by_affinity_not_applicable(device):
328328

329329
def check_create_sub_devices_by_affinity_numa(device):
330330
try:
331-
device.create_sub_devices("numa")
331+
device.create_sub_devices(partition="numa")
332332
except SubDeviceCreationError:
333333
pytest.skip("create_sub_devices can't create sub-devices on this device")
334334
except Exception:
@@ -337,7 +337,7 @@ def check_create_sub_devices_by_affinity_numa(device):
337337

338338
def check_create_sub_devices_by_affinity_L4_cache(device):
339339
try:
340-
device.create_sub_devices("L4_cache")
340+
device.create_sub_devices(partition="L4_cache")
341341
except SubDeviceCreationError:
342342
pytest.skip("create_sub_devices can't create sub-devices on this device")
343343
except Exception:
@@ -346,7 +346,7 @@ def check_create_sub_devices_by_affinity_L4_cache(device):
346346

347347
def check_create_sub_devices_by_affinity_L3_cache(device):
348348
try:
349-
device.create_sub_devices("L3_cache")
349+
device.create_sub_devices(partition="L3_cache")
350350
except SubDeviceCreationError:
351351
pytest.skip("create_sub_devices can't create sub-devices on this device")
352352
except Exception:
@@ -355,7 +355,7 @@ def check_create_sub_devices_by_affinity_L3_cache(device):
355355

356356
def check_create_sub_devices_by_affinity_L2_cache(device):
357357
try:
358-
device.create_sub_devices("L2_cache")
358+
device.create_sub_devices(partition="L2_cache")
359359
except SubDeviceCreationError:
360360
pytest.skip("create_sub_devices can't create sub-devices on this device")
361361
except Exception:
@@ -364,7 +364,7 @@ def check_create_sub_devices_by_affinity_L2_cache(device):
364364

365365
def check_create_sub_devices_by_affinity_L1_cache(device):
366366
try:
367-
device.create_sub_devices("L1_cache")
367+
device.create_sub_devices(partition="L1_cache")
368368
except SubDeviceCreationError:
369369
pytest.skip("create_sub_devices can't create sub-devices on this device")
370370
except Exception:
@@ -373,7 +373,7 @@ def check_create_sub_devices_by_affinity_L1_cache(device):
373373

374374
def check_create_sub_devices_by_affinity_next_partitionable(device):
375375
try:
376-
device.create_sub_devices("next_partitionable")
376+
device.create_sub_devices(partition="next_partitionable")
377377
except SubDeviceCreationError:
378378
pytest.skip("create_sub_devices can't create sub-devices on this device")
379379
except Exception:

0 commit comments

Comments
 (0)