Skip to content

Commit 8f23f93

Browse files
Using cached queue instead of creating new one on type inference
1 parent 4bf151c commit 8f23f93

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

numba_dpex/core/types/usm_ndarray_type.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def __init__(
5959
"The device keyword arg should be a str object specifying "
6060
"a SYCL filter selector"
6161
)
62-
self.queue = dpctl.SyclQueue(device)
62+
self.queue = dpctl.tensor._device.normalize_queue_device(device=device)
6363
self.device = device
6464
elif queue is not None and device == "unknown":
6565
if not isinstance(queue, dpctl.SyclQueue):
@@ -69,7 +69,7 @@ def __init__(
6969
self.device = self.queue.sycl_device.filter_string
7070
self.queue = queue
7171
else:
72-
self.queue = dpctl.SyclQueue()
72+
self.queue = dpctl.tensor._device.normalize_queue_device()
7373
self.device = self.queue.sycl_device.filter_string
7474

7575
if not dtype:

0 commit comments

Comments
 (0)