Skip to content

Commit 31d4c10

Browse files
authored
Merge pull request #2100 from IntelPython/backport-gh-2095
Backport gh-2095
2 parents de4b977 + b7d5d97 commit 31d4c10

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [0.20.1] - Jun. 06, 2025
8+
9+
### Fixed
10+
11+
* Fixed missing event dependencies in roll and reshape Python bindings for size-1 input arrays [gh-2095](https://github.com/IntelPython/dpctl/pull/2095)
12+
713
## [0.20.0] - Jun. 03, 2025
814

915
This release achieves compliance of `dpctl.tensor` with the Python Array API 2024.12 standard.

dpctl/tensor/libtensor/source/copy_for_reshape.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ copy_usm_ndarray_for_reshape(const dpctl::tensor::usm_ndarray &src,
108108
const char *src_data = src.get_data();
109109
char *dst_data = dst.get_data();
110110
sycl::event copy_ev =
111-
exec_q.copy<char>(src_data, dst_data, src_elemsize);
111+
exec_q.copy<char>(src_data, dst_data, src_elemsize, depends);
112112
return std::make_pair(keep_args_alive(exec_q, {src, dst}, {copy_ev}),
113113
copy_ev);
114114
}

dpctl/tensor/libtensor/source/copy_for_roll.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ copy_usm_ndarray_for_roll_1d(const dpctl::tensor::usm_ndarray &src,
132132
const char *src_data = src.get_data();
133133
char *dst_data = dst.get_data();
134134
sycl::event copy_ev =
135-
exec_q.copy<char>(src_data, dst_data, src_elemsize);
135+
exec_q.copy<char>(src_data, dst_data, src_elemsize, depends);
136136
return std::make_pair(keep_args_alive(exec_q, {src, dst}, {copy_ev}),
137137
copy_ev);
138138
}
@@ -282,7 +282,7 @@ copy_usm_ndarray_for_roll_nd(const dpctl::tensor::usm_ndarray &src,
282282
// typenames must be the same
283283
if (src_typenum != dst_typenum) {
284284
throw py::value_error(
285-
"copy_usm_ndarray_for_reshape requires src and dst to "
285+
"copy_usm_ndarray_for_roll_nd requires src and dst to "
286286
"have the same type.");
287287
}
288288

@@ -304,7 +304,7 @@ copy_usm_ndarray_for_roll_nd(const dpctl::tensor::usm_ndarray &src,
304304
const char *src_data = src.get_data();
305305
char *dst_data = dst.get_data();
306306
sycl::event copy_ev =
307-
exec_q.copy<char>(src_data, dst_data, src_elemsize);
307+
exec_q.copy<char>(src_data, dst_data, src_elemsize, depends);
308308
return std::make_pair(keep_args_alive(exec_q, {src, dst}, {copy_ev}),
309309
copy_ev);
310310
}

0 commit comments

Comments
 (0)