Skip to content
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

Fix an issue with asynchronous execution in dpnp.fft module #2067

Merged
merged 4 commits into from
Sep 20, 2024
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
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ In addition, this release completes implementation of `dpnp.fft` module and adds
* Resolved an issue with input array of `usm_ndarray` passed into `dpnp.ix_` [#2047](https://github.com/IntelPython/dpnp/pull/2047)
* Added a workaround to prevent crash in tests on Windows in internal CI/CD (when running on either Lunar Lake or Arrow Lake) [#2062](https://github.com/IntelPython/dpnp/pull/2062)
* Fixed a crash in `dpnp.choose` caused by missing control of releasing temporary allocated device memory [#2063](https://github.com/IntelPython/dpnp/pull/2063)
* Resolve compilation warning and error while building in debug mode [#2066](https://github.com/IntelPython/dpnp/pull/2066)

* Resolved compilation warning and error while building in debug mode [#2066](https://github.com/IntelPython/dpnp/pull/2066)
* Fixed an issue with asynchronous execution in `dpnp.fft` module [#2067](https://github.com/IntelPython/dpnp/pull/2067)

## [0.15.0] - 05/25/2024

Expand Down
6 changes: 4 additions & 2 deletions dpnp/fft/dpnp_utils_fft.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,8 @@ def _copy_array(x, complex_input):
dtype = x.dtype
if numpy.min(x.strides) < 0:
# negative stride is not allowed in OneMKL FFT
# TODO: support for negative strides will be added in the future
# versions of OneMKL, see discussion in MKLD-17597
copy_flag = True
elif complex_input and not dpnp.issubdtype(dtype, dpnp.complexfloating):
# c2c/c2r FFT, if input is not complex, convert to complex
Expand Down Expand Up @@ -443,8 +445,6 @@ def _truncate_or_pad(a, shape, axes):
else:
# zero-padding
exec_q = a.sycl_queue
_manager = dpu.SequentialOrderManager[exec_q]
dep_evs = _manager.submitted_events
index[axis] = slice(0, a_shape[axis]) # orig shape
a_shape[axis] = s # modified shape
order = "F" if a.flags.fnc else "C"
Expand All @@ -455,6 +455,8 @@ def _truncate_or_pad(a, shape, axes):
usm_type=a.usm_type,
sycl_queue=exec_q,
)
_manager = dpu.SequentialOrderManager[exec_q]
dep_evs = _manager.submitted_events
ht_copy_ev, copy_ev = ti._copy_usm_ndarray_into_usm_ndarray(
src=dpnp.get_usm_ndarray(a),
dst=z.get_array()[tuple(index)],
Expand Down
Loading