Use pypocketfft as FFT backend?
See original GitHub issueNumpy 1.17 has adopted the C version of pocketfft (https://gitlab.mpcdf.mpg.de/mtr/pocketfft) as their FFT implementation. Since then I have been working on the pocketfft code, converted it to C++ and added a Python wrapper.
The new library (https://gitlab.mpcdf.mpg.de/mtr/pypocketfft)
- supports complex and half-complex transforms, also Hartley transforms
- supports float, double and long double precision
- supports multi-dimensional FFTs
- uses CPU vector instructions for ndim>1 (i.e. it computes several 1D FFTs dimultaneously).
- uses the Bluestein algorithm for FFTs with large prime factors
Performance is significantly better than FFTPACK’s, accuracy as well. For benchmarks and dicussion see https://github.com/numpy/numpy/pull/11888 and recent comments in https://github.com/numpy/numpy/issues/11885.
I have also added an interface which is very similar to scipy.fftpack
.
Potential problems for adaptation:
- written in C++, requires a C++11 compiler and pybind11
- cosine/sine transforms are missing, and I probaly won’t have the time ti implement them. They would have to be added on top of the existing machinery.
Would this be of interest for Scipy?
Issue Analytics
- State:
- Created 4 years ago
- Comments:73 (73 by maintainers)
Top Results From Across the Web
CuPy backend and pypocketfft cleanup - Python GSoC - Blogs
I have opened a PR on cupy adding a scipy.fft backend ... Restarted a discussions about use of OpenMP in SciPy. pypocketfft already...
Read more >Document
FFT backend using pypocketfft. FFT backend using pypocketfft. Examples. See : Local connectivity graph. Hover to see nodes names; edges to Self not...
Read more >Scipy fft backends possibilities - python - Stack Overflow
So following release notes and GitHub SciPy and NumPy issues, you both have adopted pocketfft by default. With backend I can use fftw...
Read more >Work Submission - The Google Doc Publisher
This PR defines the scipy.fft interface and integrates the vendored pypocketfft library to implement the FFTs. As part of this I also improved...
Read more >fft/_pocketfft/__init__.py · colesbury/scipy - Gemfury
FFT backend using pypocketfft """ from .basic import * from .realtransforms import * from .helper import * from scipy._lib._testutils import PytestTester ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes that makes sense. I think we’re saying the same thing in different words:)
I’m pretty sure “instead of”.
For most existing code it’s an extra one-liner change (import
fft
instead offftpack
). Also, it cleans up the uglyfftpack
name, which never made too much senseI’m starting to think “instead of” (i.e., keep scipy.fftpack just for backward compatibility and focus this new effort on a new scipy.fft) might be nicer in the long term from a maintainability and usability/naming/user expectation perspective.