Skip to content

Update dpnp.fft to run on CUDA #2332

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 8 commits into from
Feb 24, 2025
Merged

Update dpnp.fft to run on CUDA #2332

merged 8 commits into from
Feb 24, 2025

Conversation

vlad-perevezentsev
Copy link
Collaborator

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).
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.

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • If this PR is a work in progress, are you filing the PR as a draft?

Copy link
Contributor

github-actions bot commented Feb 21, 2025

View rendered docs @ https://intelpython.github.io/dpnp/index.html

@coveralls
Copy link
Collaborator

coveralls commented Feb 21, 2025

Coverage Status

coverage: 71.782% (+0.001%) from 71.781%
when pulling 1c43ea2 on cuda_update_fft
into 25bf9cc on master.

Copy link
Contributor

github-actions bot commented Feb 21, 2025

Array API standard conformance tests for dpnp=0.17.0dev7=py312he4f9c94_19 ran successfully.
Passed: 1004
Failed: 0
Skipped: 10

Copy link
Contributor

@antonwolfy antonwolfy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vlad-perevezentsev vlad-perevezentsev merged commit 8efd438 into master Feb 24, 2025
67 of 68 checks passed
@vlad-perevezentsev vlad-perevezentsev deleted the cuda_update_fft branch February 24, 2025 19:05
github-actions bot added a commit that referenced this pull request 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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants