@@ -186,8 +186,10 @@ def _asarray_from_usm_ndarray(
186
186
order = order ,
187
187
buffer_ctor_kwargs = {"queue" : copy_q },
188
188
)
189
- # FIXME: call copy_to when implemented
190
- res [(slice (None , None , None ),) * res .ndim ] = usm_ndary
189
+ hev , _ = ti ._copy_usm_ndarray_into_usm_ndarray (
190
+ src = usm_ndary , dst = res , sycl_queue = copy_q
191
+ )
192
+ hev .wait ()
191
193
return res
192
194
193
195
@@ -207,7 +209,7 @@ def _asarray_from_numpy_ndarray(
207
209
if dtype is None :
208
210
ary_dtype = ary .dtype
209
211
dtype = _get_dtype (dtype , copy_q , ref_type = ary_dtype )
210
- if dtype .itemsize > ary_dtype .itemsize :
212
+ if dtype .itemsize > ary_dtype .itemsize or ary_dtype == np . uint64 :
211
213
dtype = ary_dtype
212
214
f_contig = ary .flags ["F" ]
213
215
c_contig = ary .flags ["C" ]
@@ -244,8 +246,10 @@ def _asarray_from_numpy_ndarray(
244
246
order = order ,
245
247
buffer_ctor_kwargs = {"queue" : copy_q },
246
248
)
247
- # FIXME: call copy_to when implemented
248
- res [(slice (None , None , None ),) * res .ndim ] = ary
249
+ hev , _ = ti ._copy_numpy_ndarray_into_usm_ndarray (
250
+ src = ary , dst = res , sycl_queue = copy_q
251
+ )
252
+ hev .wait ()
249
253
return res
250
254
251
255
0 commit comments