Closed
Conversation
jpsamaroo
requested changes
Mar 4, 2025
src/fft.jl
Outdated
| struct IRFFT! end | ||
| struct IFFT! end | ||
|
|
||
| export FFT, RFFT, IRFFT, IFFT, FFT!, RFFT!, IRFFT!, IFFT!, fft, ifft |
Member
There was a problem hiding this comment.
Suggested change
| export FFT, RFFT, IRFFT, IFFT, FFT!, RFFT!, IRFFT!, IFFT!, fft, ifft |
We shouldn't need to export any of these. If users want to use Dagger's FFT, all they should need to do is using Dagger, AbstractFFTs and then fft(A) where A <: DArray.
src/fft.jl
Outdated
| @@ -0,0 +1,576 @@ | |||
| using AbstractFFTs | |||
| using LinearAlgebra | |||
| using Dagger: DArray, @spawn, InOut, In | |||
Member
There was a problem hiding this comment.
Suggested change
| using Dagger: DArray, @spawn, InOut, In |
By being in Dagger, these are already available directly.
src/fft.jl
Outdated
| else | ||
| throw(ArgumentError("Unknown transform type")) | ||
| end | ||
|
|
src/fft.jl
Outdated
Comment on lines
6
to
9
| struct FFT end | ||
| struct RFFT end | ||
| struct IRFFT end | ||
| struct IFFT end |
Member
There was a problem hiding this comment.
Suggested change
| struct FFT end | |
| struct RFFT end | |
| struct IRFFT end | |
| struct IFFT end |
See below for explanation.
src/fft.jl
Outdated
| using AbstractFFTs | ||
| using LinearAlgebra | ||
| using Dagger: DArray, @spawn, InOut, In | ||
| using MPI |
Member
There was a problem hiding this comment.
Suggested change
| using MPI |
We won't directly use MPI for the FFT implementation - Datadeps will handle this for us automatically, when necessary.
src/fft.jl
Outdated
| end | ||
| end | ||
|
|
||
| redistribute_x_to_y!(A, B) |
Member
There was a problem hiding this comment.
Suggested change
| redistribute_x_to_y!(A, B) | |
| copyto!(A, B) |
| Dagger.@spawn name="apply_fft!(dim 2)[$idx]" apply_fft!(InOut(B_parts[idx]), In(transforms[2]), In(dims[2])) | ||
| end | ||
| end | ||
|
|
| end | ||
| end | ||
|
|
||
| end No newline at end of file |
src/fft.jl
Outdated
| end | ||
| end | ||
|
|
||
| redistribute!(A, B) |
Member
There was a problem hiding this comment.
Suggested change
| redistribute!(A, B) | |
| copyto!(A, B) | |
src/fft.jl
Outdated
| end | ||
| end | ||
|
|
||
| function ifft(A::DArray{T,2}, B::DArray{T,2}, transforms, dims) where T |
Member
There was a problem hiding this comment.
Suggested change
| function ifft(A::DArray{T,2}, B::DArray{T,2}, transforms, dims) where T | |
| function AbstractFFTs.ifft!(out::DMatrix{T}, A::DMatrix{T}; dims, decomp::Decomposition=Slab()) where T |
Member
|
Superseded by #589 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.