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

NFFT on GPU based on Package Extensions and GPUArrays.jl #136

Merged
merged 5 commits into from
Jul 3, 2024

Conversation

nHackel
Copy link
Collaborator

@nHackel nHackel commented Jun 27, 2024

This PR adds a new NFFT plan which is essentially just a copy of the current CuNFFT Plan. However, in this PR the plan is writing in a GPU-agnostic way and will work for any GPU implementing an FFT-Plan.

The plan can also be tested with JLArrays in CI without requiring a GPU

U = params.storeDeconvolutionIdx ? N : ntuple(d->0,D)
tmpVecHat = adapt(arr, zeros(Complex{T}, U))

deconvIdx = adapt(arr, Int32.(deconvolveIdx))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Here I changed the indices to be Int32, as these are usually more efficient for a GPU


deconvIdx = adapt(arr, Int32.(deconvolveIdx))
winHatInvLUT = adapt(arr, windowHatInvLUT[1])
B_ = adapt(arr, Complex{T}.(B)) # Bit hacky
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In my test B had an eltype of Float32 and I didn't see a way where I could tell adapt to change the eltype. So I changed it beforehand

Copy link

codecov bot commented Jun 27, 2024

Codecov Report

Attention: Patch coverage is 85.07463% with 10 lines in your changes missing coverage. Please review.

Project coverage is 88.28%. Comparing base (a92f27d) to head (b6ca003).
Report is 7 commits behind head on master.

Files Patch % Lines
ext/NFFTGPUArraysExt/implementation.jl 84.84% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #136      +/-   ##
==========================================
- Coverage   88.63%   88.28%   -0.35%     
==========================================
  Files          10       12       +2     
  Lines        1126     1195      +69     
==========================================
+ Hits          998     1055      +57     
- Misses        128      140      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nHackel nHackel mentioned this pull request Jun 28, 2024
@tknopp tknopp merged commit dd72b2c into JuliaMath:master Jul 3, 2024
4 of 7 checks passed
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.

2 participants