Skip to content

Commit 8e716ae

Browse files
Fix UnboundLocalError when default queue could not be created (#554)
1 parent a6498a9 commit 8e716ae

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

dpctl/_sycl_queue.pyx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,11 @@ cdef class SyclQueue(_SyclQueue):
327327
.format(arg)
328328
)
329329
elif status == -2 or status == -8:
330+
default_dev_error = (
331+
"Default SYCL Device could not be created."
332+
)
330333
raise SyclQueueCreationError(
334+
default_dev_error if (len_args == 0) else
331335
"SYCL Device '{}' could not be created.".format(arg)
332336
)
333337
elif status == -3 or status == -7:

0 commit comments

Comments
 (0)