File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 2424import dpctl .memory
2525
2626
27- def _create_memory ():
27+ def _create_memory (q ):
2828 nbytes = 1024
29- mobj = dpctl .memory .MemoryUSMShared (nbytes )
29+ mobj = dpctl .memory .MemoryUSMShared (nbytes , queue = q )
3030 return mobj
3131
3232
@@ -35,9 +35,9 @@ def _create_memory():
3535 reason = "No SYCL devices except the default host device." ,
3636)
3737def test_memcpy_copy_usm_to_usm ():
38- mobj1 = _create_memory ()
39- mobj2 = _create_memory ()
4038 q = dpctl .SyclQueue ()
39+ mobj1 = _create_memory (q )
40+ mobj2 = _create_memory (q )
4141
4242 mv1 = memoryview (mobj1 )
4343 mv2 = memoryview (mobj2 )
@@ -54,8 +54,8 @@ def test_memcpy_copy_usm_to_usm():
5454# reason="No SYCL devices except the default host device."
5555# )
5656def test_memcpy_type_error ():
57- mobj = _create_memory ()
58- q = mobj . _queue
57+ q = dpctl . SyclQueue ()
58+ mobj = _create_memory ( q )
5959
6060 with pytest .raises (TypeError ) as cm :
6161 q .memcpy (None , mobj , 3 )
You can’t perform that action at this time.
0 commit comments