Skip to content

Optionally allow pyFFTW in place of numpy.fft #2092

Closed

Description

@jakirkham

The pyFFTW provides a nice lightweight Python library that wraps FFTW. Given how well optimized FFTW is, this ends up being significantly faster. Thanks to its interfaces it is pretty easy to drop in a pyFFTW in place of NumPy's FFTPACK. Would be nice if there was an option (maybe a function?) to change up the FFT backend used in Dask.

Activity

  1. mrocklin commented on Mar 16, 2017

    @mrocklin
    Member
  2. jakirkham commented on Mar 16, 2017

    @jakirkham
    MemberAuthor

    This is not very clever, but I had thought about just reassigning what npfft points to after the fact.

  3. mrocklin commented on Mar 16, 2017

    @mrocklin
    Member

    Yeah, Dask probably can't do that responsibly. You could in your own code thought.

    Probably there is some way to change _fft_wrap to take a function name, like 'fft' and produce a function that takes an fft module as a keyword argument. This keyword would default to np.fft but could be replaced by others.

  4. jakirkham commented on Mar 16, 2017

    @jakirkham
    MemberAuthor

    A different idea might be to let people wrap their own FFTs. So we provide functions like *fft_wrap, which take an FFT function of that type and return a function that can perform an FFT of that form. So as an example fft_wrap(numpy.fft.fft) would return the same thing as dask.array.fft.fft.

  5. mrocklin commented on Mar 16, 2017

    @mrocklin
    Member

    Sure, that sounds like a great idea. Presumably this works well now. We might want to make the _fft_wrap function slightly more user-facing with a nice docstring with examples and such.

  6. jakirkham commented on Mar 16, 2017

    @jakirkham
    MemberAuthor

    Ok, I'll give it a look.

  7. jakirkham commented on Mar 16, 2017

    @jakirkham
    MemberAuthor

    Please see PR ( #2093 ).

  8. added this to the 0.14.1 milestone on Mar 30, 2017
  9. jakirkham commented on Nov 26, 2018

    @jakirkham
    MemberAuthor

    Probably worth noting that as of pyFFTW 0.11.0+, they provide a Dask-like interface, which can be used as a drop-in substitute for the one we provide.

    ref: https://pyfftw.readthedocs.io/en/latest/source/pyfftw/interfaces/interfaces.html#dask-fft

  10. mrocklin commented on Nov 26, 2018

    @mrocklin
    Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions