File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -236,6 +236,7 @@ def _asarray_from_numpy_ndarray(
236236 if dtype is None :
237237 # deduce device-representable output data type
238238 dtype = _map_to_device_dtype (ary .dtype , copy_q )
239+ _ensure_native_dtype_device_support (dtype , copy_q .sycl_device )
239240 f_contig = ary .flags ["F" ]
240241 c_contig = ary .flags ["C" ]
241242 fc_contig = f_contig or c_contig
@@ -245,10 +246,8 @@ def _asarray_from_numpy_ndarray(
245246 order = "C" if c_contig else "F"
246247 if order == "K" :
247248 # new USM allocation
248- _ensure_native_dtype_device_support (dtype , copy_q .sycl_device )
249249 res = _from_numpy_empty_like_orderK (ary , dtype , usm_type , copy_q )
250250 else :
251- _ensure_native_dtype_device_support (dtype , copy_q .sycl_device )
252251 res = dpt .usm_ndarray (
253252 ary .shape ,
254253 dtype = dtype ,
You can’t perform that action at this time.
0 commit comments