[WIP] Replace FFTW with FFTA.jl as default FFT backend#653
Conversation
- Add FFTA.jl as the primary FFT backend (pure Julia, works with any numeric type) - Move FFTW.jl to a package extension that loads automatically when FFTW is used - Create FFTBackend abstraction layer with FFTABackend and FFTWBackend - All existing tests pass; both backends produce identical results Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #653 +/- ##
==========================================
- Coverage 98.13% 96.73% -1.41%
==========================================
Files 19 20 +1
Lines 3279 3249 -30
==========================================
- Hits 3218 3143 -75
- Misses 61 106 +45 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| end | ||
|
|
||
| function ifft!(::FFTABackend, x) | ||
| # FFTA doesn't have in-place operations, so we compute and copy back |
There was a problem hiding this comment.
This is not quite true, the in-place version is mul! on the corresponding plan object
|
The idea for this PR isn't bad (I presume some kind of FFTA -> FFTW syntax translation package cum trampoline), but IMO that's more general than should be in this package. So, I believe it's better if you develop it as a standalone package, maybe ask JuliaMath if they want something like this. If it gets mature enough we can just switch to it later on. |
|
Yeah, that's probably the better approach. I started this before I realized the API mismatch 😅 |
|
It would be good to get @stevengj's thoughts on this. I think a lot of people like having non-GPL dependencies as the default, but we should only do it if those are the best. Otherwise, we may want a more flexible system to pick different defaults. |
|
It's perfectly reasonable to have a pluggable backend, and really the whole AbstractFFTs.jl structure needs to be re-done so that this can be done in a composable way (JuliaMath/AbstractFFTs.jl#32) However, as a default method, I currently have serious accuracy concerns about FFTA.jl: JuliaMath/FFTA.jl#118 (aside from performance questions). |
Summary
Replace FFTW (GPL licensed) with FFTA (MIT). This still needs a bunch of work and probably a new release of FFTA to bring it up to speed with AbstractFFTs.jl and what we need here, so we can remove hacks in this package
Changes
src/fft/FFTBackend.jl: Abstract FFT backend interfacesrc/fft/FFTAImpl.jl: FFTA backend implementationext/FFTWExt.jl: FFTW package extensionFFTBackendinstead of direct FFTW importsUsage
🤖 Generated with Claude Code