@@ -186,8 +186,10 @@ def _asarray_from_usm_ndarray(
186186 order = order ,
187187 buffer_ctor_kwargs = {"queue" : copy_q },
188188 )
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 ()
191193 return res
192194
193195
@@ -207,7 +209,7 @@ def _asarray_from_numpy_ndarray(
207209 if dtype is None :
208210 ary_dtype = ary .dtype
209211 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 :
211213 dtype = ary_dtype
212214 f_contig = ary .flags ["F" ]
213215 c_contig = ary .flags ["C" ]
@@ -244,8 +246,9 @@ def _asarray_from_numpy_ndarray(
244246 order = order ,
245247 buffer_ctor_kwargs = {"queue" : copy_q },
246248 )
247- # FIXME: call copy_to when implemented
248- res [(slice (None , None , None ),) * res .ndim ] = ary
249+ ti ._copy_numpy_ndarray_into_usm_ndarray (
250+ src = ary , dst = res , sycl_queue = copy_q
251+ )
249252 return res
250253
251254
0 commit comments