We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
__sycl_usm_array_interface__
1 parent 1b3c7e4 commit 50e8503Copy full SHA for 50e8503
dpctl/_memory.pyx
@@ -106,11 +106,13 @@ cdef class _BufferData:
106
dt = np.dtype(ary_typestr)
107
except TypeError:
108
_throw_sycl_usm_ary_iface()
109
- if ary_strides and len(ary_strides) != dt.itemsize:
+ if (ary_strides and len(ary_strides) != 1
110
+ and ary_strides[0] != dt.itemsize):
111
raise ValueError("Must be contiguous")
112
- if not ary_syclobj or not isinstance(ary_syclobj,
113
- (dpctl.SyclQueue, dpctl.SyclContext)):
+ if (not ary_syclobj or
114
+ not isinstance(ary_syclobj,
115
+ (dpctl.SyclQueue, dpctl.SyclContext))):
116
117
118
buf = _BufferData.__new__(_BufferData)
0 commit comments