File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ import numpy as np
24
24
25
25
import dpctl
26
26
import dpctl.memory as dpmem
27
- import dpctl.utils as du
28
27
29
28
from .._backend cimport DPCTLSyclUSMRef
30
29
from .._sycl_device_factory cimport _cached_default_device
@@ -82,7 +81,7 @@ cdef class InternalUSMArrayError(Exception):
82
81
cdef object _as_zero_dim_ndarray(object usm_ary):
83
82
" Convert size-1 array to NumPy 0d array"
84
83
mem_view = dpmem.as_usm_memory(usm_ary)
85
- du.SequentialOrderManager .wait()
84
+ usm_ary.sycl_queue .wait()
86
85
host_buf = mem_view.copy_to_host()
87
86
view = host_buf.view(usm_ary.dtype)
88
87
view.shape = tuple ()
@@ -519,6 +518,8 @@ cdef class usm_ndarray:
519
518
" byte_offset is not a multiple of item_size." )
520
519
elem_offset = byte_offset // item_size
521
520
ary_iface[' offset' ] = elem_offset
521
+ # must wait for content of the memory to finalize
522
+ self .sycl_queue.wait()
522
523
return ary_iface
523
524
524
525
@property
You can’t perform that action at this time.
0 commit comments