Skip to content

Support >= 3 dimensional generic ffts #53

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

hsgg
Copy link

@hsgg hsgg commented Jun 3, 2025

I recently had the need (or, rather, I thought I had the need) for arbitrary precision multi-dimensional FFTs. So I implemented them here. I also took the chance to optimize the power-of-two case a little.

It gets within a factor ~4 of FFTW without wisdom:

$ julia --project=GenericFFT -t 8

julia> A = randn(ComplexF64, 512, 512, 512);

julia> using GenericFFT, FFTW

julia> FFTW.set_num_threads(8)

julia> @time fft(A); @time fft(A);
  0.892791 seconds (2.31 k allocations: 2.000 GiB, 9.39% gc time, 2.88% compilation time)
  0.853025 seconds (128 allocations: 2.000 GiB, 4.21% gc time)

julia> @time GenericFFT.generic_fft(A); @time GenericFFT.generic_fft(A);
  3.884851 seconds (3.94 M allocations: 4.198 GiB, 0.92% gc time, 108.37% compilation time)
  3.253270 seconds (132 allocations: 4.000 GiB, 1.83% gc time)

which was on a MacOS M1:

julia> versioninfo()
Julia Version 1.11.5
Commit 760b2e5b739 (2025-04-14 06:53 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (arm64-apple-darwin24.0.0)
  CPU: 10 × Apple M1 Max
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, apple-m1)
Threads: 8 default, 0 interactive, 4 GC (on 8 virtual cores)

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.

1 participant