Skip to content

Commit 93c0418

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

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

numba_dpex/core/types/usm_ndarray_type.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ 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(
63+
device=device
64+
)
6365
self.device = device
6466
elif queue is not None and device == "unknown":
6567
if not isinstance(queue, dpctl.SyclQueue):
@@ -69,7 +71,7 @@ def __init__(
6971
self.device = self.queue.sycl_device.filter_string
7072
self.queue = queue
7173
else:
72-
self.queue = dpctl.SyclQueue()
74+
self.queue = dpctl.tensor._device.normalize_queue_device()
7375
self.device = self.queue.sycl_device.filter_string
7476

7577
if not dtype:

0 commit comments

Comments
 (0)