File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -226,3 +226,22 @@ def test_nested_context_factory_exception_if_wrong_factory(
226226 with _register_nested_context_factory (factory ):
227227 with dpctl .device_context ("opencl:cpu:0" ):
228228 pass
229+
230+
231+ def test__DeviceDefaultQueueCache ():
232+ import copy
233+
234+ from dpctl ._sycl_queue_manager import _global_device_queue_cache as cache
235+ from dpctl ._sycl_queue_manager import get_device_cached_queue
236+
237+ try :
238+ d = dpctl .SyclDevice ()
239+ except dpctl .SyclDeviceCreationError :
240+ pytest .skip ("Could not create default device" )
241+
242+ q1 = get_device_cached_queue (d )
243+ cache_copy = copy .copy (cache .get ())
244+ q2 , changed = cache_copy .get_or_create (d )
245+
246+ assert not changed
247+ assert q1 == q2
You can’t perform that action at this time.
0 commit comments