Skip to content

Commit 3bc643d

Browse files
Merge branch 'master' of https://github.com/IntelPython/dpnp into noncentral_chisquare
2 parents cf1f2a2 + 41d557f commit 3bc643d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

dpnp/dpnp_iface.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,13 @@ def get_dpnp_descriptor(ext_obj, copy_when_strides=True):
212212
if copy_when_strides and getattr(ext_obj, "strides", None) is not None:
213213
# TODO: replace this workaround when usm_ndarray will provide such functionality
214214
shape_offsets = tuple(numpy.prod(ext_obj.shape[i+1:], dtype=numpy.int64) for i in range(ext_obj.ndim))
215-
if ext_obj.strides != shape_offsets:
215+
216+
if hasattr(ext_obj, "__sycl_usm_array_interface__"):
217+
ext_obj_offset = ext_obj.__sycl_usm_array_interface__.get("offset", 0)
218+
else:
219+
ext_obj_offset = 0
220+
221+
if ext_obj.strides != shape_offsets or ext_obj_offset != 0:
216222
ext_obj = array(ext_obj)
217223

218224
dpnp_desc = dpnp_descriptor(ext_obj)

tests/skipped_tests_gpu.tbl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
tests/test_random.py::TestPermutationsTestShuffle::test_shuffle1[lambda x: dpnp.asarray([[i, i] for i in x])]
2-
tests/third_party/cupy/indexing_tests/test_indexing.py::TestChoose::test_choose
32

43
tests/test_arraymanipulation.py::TestConcatenate::test_concatenate
54
tests/test_histograms.py::TestHistogram::test_density

0 commit comments

Comments
 (0)