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(
236
236
if dtype is None :
237
237
# deduce device-representable output data type
238
238
dtype = _map_to_device_dtype (ary .dtype , copy_q )
239
+ _ensure_native_dtype_device_support (dtype , copy_q .sycl_device )
239
240
f_contig = ary .flags ["F" ]
240
241
c_contig = ary .flags ["C" ]
241
242
fc_contig = f_contig or c_contig
@@ -245,10 +246,8 @@ def _asarray_from_numpy_ndarray(
245
246
order = "C" if c_contig else "F"
246
247
if order == "K" :
247
248
# new USM allocation
248
- _ensure_native_dtype_device_support (dtype , copy_q .sycl_device )
249
249
res = _from_numpy_empty_like_orderK (ary , dtype , usm_type , copy_q )
250
250
else :
251
- _ensure_native_dtype_device_support (dtype , copy_q .sycl_device )
252
251
res = dpt .usm_ndarray (
253
252
ary .shape ,
254
253
dtype = dtype ,
You can’t perform that action at this time.
0 commit comments