Skip to content

Commit e6ac803

Browse files
Fixing UnboundLocalError raised on line 347
This may arise when CPU RT is misconfigued and TBB library can not be found by the CPU driver, resulting in failure to create context, and hence the queue.
1 parent 880b0c3 commit e6ac803

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dpctl/_sycl_queue.pyx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,10 @@ cdef class SyclQueue(_SyclQueue):
344344
)
345345
elif status == -3 or status == -7:
346346
raise SyclQueueCreationError(
347-
"SYCL Context could not be created from '{}'.".format(arg)
347+
"SYCL Context could not be created "
348+
("by default constructor" if len_args == 0 else
349+
"from '{}'.".format(arg)
350+
)
348351
)
349352
elif status == -4 or status == -6:
350353
if len_args == 2:

0 commit comments

Comments
 (0)