From a727866d4fb11d2c2cc8aad84c5022dd98930ac1 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Thu, 2 Mar 2023 06:44:23 -0600 Subject: [PATCH] get_minmax_offsets should always return data relative to data ptr This means that it should not be making call to UsmNDArray_GetOffset. This restores correctness to checks for array region overlapping. --- dpctl/apis/include/dpctl4pybind11.hpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/dpctl/apis/include/dpctl4pybind11.hpp b/dpctl/apis/include/dpctl4pybind11.hpp index a26af2f51c..0086193de8 100644 --- a/dpctl/apis/include/dpctl4pybind11.hpp +++ b/dpctl/apis/include/dpctl4pybind11.hpp @@ -943,8 +943,6 @@ class usm_ndarray : public py::object } } else { - offset_min = api.UsmNDArray_GetOffset_(raw_ar); - offset_max = offset_min; for (int i = 0; i < nd; ++i) { py::ssize_t delta = strides[i] * (shape[i] - 1); if (strides[i] > 0) {