Skip to content

Commit ec96da9

Browse files
authored
fix: raise an error when arguments are not provided as list (#2438)
1 parent 43596ee commit ec96da9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

onedal/tests/utils/_device_selection.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ def get_memory_usm():
6363

6464

6565
def is_dpctl_device_available(targets):
66+
if not isinstance(targets, (list, tuple)):
67+
raise TypeError("`targets` should be a list or tuple of strings.")
6668
if dpctl_available:
6769
for device in targets:
6870
if device == "cpu" and not dpctl.has_cpu_devices():

0 commit comments

Comments
 (0)