Skip to content

Commit

Permalink
Using cached queue instead of creating new one on type inference
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderKalistratov committed Mar 2, 2023
1 parent 4bf151c commit 8f23f93
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions numba_dpex/core/types/usm_ndarray_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def __init__(
"The device keyword arg should be a str object specifying "
"a SYCL filter selector"
)
self.queue = dpctl.SyclQueue(device)
self.queue = dpctl.tensor._device.normalize_queue_device(device=device)
self.device = device
elif queue is not None and device == "unknown":
if not isinstance(queue, dpctl.SyclQueue):
Expand All @@ -69,7 +69,7 @@ def __init__(
self.device = self.queue.sycl_device.filter_string
self.queue = queue
else:
self.queue = dpctl.SyclQueue()
self.queue = dpctl.tensor._device.normalize_queue_device()
self.device = self.queue.sycl_device.filter_string

if not dtype:
Expand Down

0 comments on commit 8f23f93

Please sign in to comment.