From 125585ae451b8994b4e2153885be8f780e58f7ca Mon Sep 17 00:00:00 2001 From: "Wang, Mingjie1" Date: Fri, 31 Mar 2023 11:21:50 -0500 Subject: [PATCH] Fixed layout in dpnp overload. --- numba_dpex/dpnp_iface/arrayobj.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/numba_dpex/dpnp_iface/arrayobj.py b/numba_dpex/dpnp_iface/arrayobj.py index 90e3f922ad..694ac37db5 100644 --- a/numba_dpex/dpnp_iface/arrayobj.py +++ b/numba_dpex/dpnp_iface/arrayobj.py @@ -326,6 +326,7 @@ def ol_dpnp_zeros( """ _ndim = _ty_parse_shape(shape) + _layout = _parse_layout(order) _dtype = _parse_dtype(dtype) _usm_type = _parse_usm_type(usm_type) if usm_type is not None else "device" _device = ( @@ -334,7 +335,7 @@ def ol_dpnp_zeros( if _ndim: ret_ty = build_dpnp_ndarray( _ndim, - layout=order, + layout=_layout, dtype=_dtype, usm_type=_usm_type, device=_device, @@ -407,6 +408,7 @@ def ol_dpnp_ones( _ndim = _ty_parse_shape(shape) _dtype = _parse_dtype(dtype) + _layout = _parse_layout(order) _usm_type = _parse_usm_type(usm_type) if usm_type is not None else "device" _device = ( _parse_device_filter_string(device) if device is not None else "unknown" @@ -414,7 +416,7 @@ def ol_dpnp_ones( if _ndim: ret_ty = build_dpnp_ndarray( _ndim, - layout=order, + layout=_layout, dtype=_dtype, usm_type=_usm_type, device=_device,