-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
ENH: Optimize the FFT implementation #17839
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
Comments
There is another option, which is to defer to scipy for fft. That path would be defensible since fft is a gateway function to signal processing, and the signal processing tools in scipy are, like its fft, very good. |
Isn't FFTS unmaintained? The last commit was 3 years ago, even older than pocketfft. NumPy has been the reference implementation for fundamental FFT functionalities, and I expect it to do things right (accuracies, coverage of all existing kinds of transforms, etc). Without showing a solid and thorough benchmark for how "slow" the current pocketfft solution is (which I doubt) for every kind of transforms as a basis for further discussion, I find it hard to justify another migration within such a short period. |
|
@mattip Scipy is using
As we can see, fftw3 is better than pocketfft with large arrays. @mreineck Glad to hear your pertinent comment, would you like to vectorize the current pocketfft if we don't want follow scipy's strategy? I think you are the best candidate to finish the optimize task. |
I meant we should not touch the fft module in NumPy, rather we should consider removing it from NumPy altogether or at least clearly document that SciPy has a better implementation and more complete support for signal-processing tools than NumPy ever will. |
Sorry, but this is a task I won't have time for. Please understand that even in C++ In my ideal world, |
Here is a very similar benchmark in 2D, including
Here, FFTW already starts to lose for large sizes. (It would probably still win if it could do full planning, but then the interface becomes much more complicated). At small sizes one can see the vectorization advantage of |
Thanks for pointing that out, modified to |
Fast Fourier transforms are widely used for applications in engineering, music, science, and mathematics.The current fft implementation was introduced two years ago(#11885, #11888 ), which is not the best implementation as far as I know, The drawbacks includes:
Although the author published the C++ based pypocketfft later, which has overcame these shortcomings, but It's was not compatible with C based numpy, I found out that there has several backend projects that worth considering.
Now we have two options:
The text was updated successfully, but these errors were encountered: