-
Notifications
You must be signed in to change notification settings - Fork 165
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
[DFT][cuFFT] Invalid strides error on CUDA #631
Labels
bug
A request to fix an issue
help wanted
Tasks, issues or features that could be implemented and contributed to the project
Comments
Thank you for the issue. This looks like a bug in how the strides are converted from oneMath format to cuFFT, in particular aorund https://github.com/uxlfoundation/oneMath/blob/develop/src/dft/backends/cufft/commit.cpp#L189. From a quick look I haven't been able to figure out a way to fix this configuration without breaking others. |
6 tasks
vlad-perevezentsev
added a commit
to IntelPython/dpnp
that referenced
this issue
Feb 24, 2025
This PR suggests fixing the current issues with `dpnp.fft.fftn()` and `dpnp.fft.rfftn()` on CUDA and removing the skip tests for them The `incorrect result` issue for `dpnp.fft.fftn()` on cuda was because preparing the input array when `batch_fft=True` could change it to `F contiguous` array. cuFFT for correct execution requires `C contiguous` array as input. The issue with raising `Invalid strides` error is a bug in oneMath ([631](uxlfoundation/oneMath#631)). As a workaround until this issue is solved it is suggested to use swap of the last two axes if the last dimension is 1 and there are multiple axes. In this case the strides inside cuFFT are calculated correctly. Additionally updated the arguments for `test_erf` in `skipped_tests_cuda.tbl` to skip it on cuda.
github-actions bot
added a commit
to IntelPython/dpnp
that referenced
this issue
Feb 24, 2025
This PR suggests fixing the current issues with `dpnp.fft.fftn()` and `dpnp.fft.rfftn()` on CUDA and removing the skip tests for them The `incorrect result` issue for `dpnp.fft.fftn()` on cuda was because preparing the input array when `batch_fft=True` could change it to `F contiguous` array. cuFFT for correct execution requires `C contiguous` array as input. The issue with raising `Invalid strides` error is a bug in oneMath ([631](uxlfoundation/oneMath#631)). As a workaround until this issue is solved it is suggested to use swap of the last two axes if the last dimension is 1 and there are multiple axes. In this case the strides inside cuFFT are calculated correctly. Additionally updated the arguments for `test_erf` in `skipped_tests_cuda.tbl` to skip it on cuda. 8efd438
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
A request to fix an issue
help wanted
Tasks, issues or features that could be implemented and contributed to the project
Summary
When performing
DPF transform
withoneapi::mkl::dft
on NVIDIA GPU for multidimensional arrays >=2D where thelast dimension is 1
[(2,1), (5,1), (2,3,1)....]The computation fails with
oneMKL: dft/backends/cufft/commit: Invalid strides
This problem does not occur when running on Intel.
Version
I am using the latest release version v0.6
Environment
Steps to reproduce
Building:
Compiling:
Running:
Reproducer here
Observed behavior
When executing the attached code on NVIDIA the program fails with an error
Example output
However, running the same code on Intel works as expected
Expected behavior
Similar implementation that uses cuFFT directly works correctly
Reproducer here
The text was updated successfully, but these errors were encountered: