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
PyFFTW3 vs pyFFTW #10
Comments
Comment by mperrin Test code benchmarks the two versus each other. Benchmark code available at https://gist.github.com/mperrin/5763120 (The following taken verbatim from an email to collaborators) There are now two different/independent python packages that wrap the FFTW library: Note the similar but non-identical names. "pyFFTW" is more recent and appears to be more actively developed now, while PyFFTW3 was last updated in 2010 and does not support Python 3. See the discussion at astropy/astropy#660 . This is kind of annoying on a practical level due to increased hassle + cognitive overload from competing libraries, but oh well. I've never been able to get PyFFTW3's wisdom saving to work properly so I was motivated to try out the newer package instead. I've now benchmarked the two and it turns out that the speeds are effectively identical. This is good. But it took a bit of fussing to get the code working properly (different calling conventions, etc). So, for posterity, here's my speed test results on my Mac Pro, plus my test script. I'll probably switch over to pyFFTW for the next version of WebbPSF. Array size: 1024 x 1024 Now planning numpy in the forward direction FFT type: numpy Time Elapsed: 0.0931 s Array size: 2048 x 2048 Now planning numpy in the forward direction FFT type: numpy Time Elapsed: 0.5265 s Array size: 4096 x 4096 Now planning numpy in the forward direction FFT type: numpy Time Elapsed: 2.1550 s |
Comment by keflavich Finally got pyfftw installed; looks like I get comparable numbers all around:
(mine's a Mac Pro with 2xQuad-Core Intel Xeon 2.93 GHz with hyperthreading, so |
Comment by keflavich Added some more results with an added test: https://gist.github.com/keflavich/5797994 (a fork of your gist, see specifically https://gist.github.com/keflavich/5797994#file-results-txt). Without planning first, pyfftw still outperforms numpy, but barely. Also, I got some wildly inconsistent results so I suspect my machine must have found something else to do during some of the tests... |
Comment by mperrin Poppy and webbpsf now both updated to use pyfftw. |
Issue by mperrin
Wednesday Apr 24, 2013 at 21:13 GMT
Originally opened as mperrin/webbpsf#10
Argh, there are two packaged for FFTW access in Python. Should evaluate & compare.
See: astropy/astropy#660
for some discussion in astropy.
TBD how best to work with planning to support stored wisdom for large 2D FFTs to minimize replanning.
The text was updated successfully, but these errors were encountered: