Skip to content

Backport gh-2095 #2100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.20.1] - Jun. 06, 2025

### Fixed

* Fixed missing event dependencies in roll and reshape Python bindings for size-1 input arrays [gh-2095](https://github.com/IntelPython/dpctl/pull/2095)

## [0.20.0] - Jun. 03, 2025

This release achieves compliance of `dpctl.tensor` with the Python Array API 2024.12 standard.
Expand Down
2 changes: 1 addition & 1 deletion dpctl/tensor/libtensor/source/copy_for_reshape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ copy_usm_ndarray_for_reshape(const dpctl::tensor::usm_ndarray &src,
const char *src_data = src.get_data();
char *dst_data = dst.get_data();
sycl::event copy_ev =
exec_q.copy<char>(src_data, dst_data, src_elemsize);
exec_q.copy<char>(src_data, dst_data, src_elemsize, depends);
return std::make_pair(keep_args_alive(exec_q, {src, dst}, {copy_ev}),
copy_ev);
}
Expand Down
6 changes: 3 additions & 3 deletions dpctl/tensor/libtensor/source/copy_for_roll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ copy_usm_ndarray_for_roll_1d(const dpctl::tensor::usm_ndarray &src,
const char *src_data = src.get_data();
char *dst_data = dst.get_data();
sycl::event copy_ev =
exec_q.copy<char>(src_data, dst_data, src_elemsize);
exec_q.copy<char>(src_data, dst_data, src_elemsize, depends);
return std::make_pair(keep_args_alive(exec_q, {src, dst}, {copy_ev}),
copy_ev);
}
Expand Down Expand Up @@ -282,7 +282,7 @@ copy_usm_ndarray_for_roll_nd(const dpctl::tensor::usm_ndarray &src,
// typenames must be the same
if (src_typenum != dst_typenum) {
throw py::value_error(
"copy_usm_ndarray_for_reshape requires src and dst to "
"copy_usm_ndarray_for_roll_nd requires src and dst to "
"have the same type.");
}

Expand All @@ -304,7 +304,7 @@ copy_usm_ndarray_for_roll_nd(const dpctl::tensor::usm_ndarray &src,
const char *src_data = src.get_data();
char *dst_data = dst.get_data();
sycl::event copy_ev =
exec_q.copy<char>(src_data, dst_data, src_elemsize);
exec_q.copy<char>(src_data, dst_data, src_elemsize, depends);
return std::make_pair(keep_args_alive(exec_q, {src, dst}, {copy_ev}),
copy_ev);
}
Expand Down
Loading