[SciPy-Dev] pybind11 dependency (was: scipy.fft submodule)
Ralf Gommers
ralf.gommers at gmail.com
Thu Jul 4 14:08:35 EDT 2019
Hi all,
Given that a few people were surprised that SciPy master now has a pybind11
dependency and asked if it was discussed on this list (to which I didn't
have an immediate answer), replying to this thread with a more explicit
subject.
On Tue, Jun 11, 2019 at 4:21 AM Ralf Gommers <ralf.gommers at gmail.com> wrote:
>
>
> On Mon, Jun 10, 2019 at 4:22 PM Peter Bell <PeterBell10 at live.co.uk> wrote:
>
>> Following on from some of the discussion surrounding my backend proposal
>> and the discussion on gh-10175
>> <https://github.com/scipy/scipy/issues/10175>; I’ve been working on
>> adding a new scipy.fft submodule. This is now working, tested,
>> documented and ready for review in gh-10238
>> <https://github.com/scipy/scipy/pull/10238>.
>>
>>
>>
>> The new submodule is almost a drop-in replacement for numpy.fft and
>> scipy.fftpack, with a few exceptions:
>>
>> - Does not include NumPy’s Hermitian transforms (hfft, ihfft) (but
>> would be simple to add)
>> - Uses numpy’s conventions for rfft (complex array) instead of fftpack’s
>> (complex values packed into a real array)
>> - Convolutions and pseudo-differential operators from fftpack are not
>> included
>>
>>
>>
>> The new submodule adds pocketfft to implement the normal FFTs (not yet
>> DCT and DST) which adds several new features beyond scipy.fftpack:
>>
>> - long double transforms
>> - multi-dimensional real FFTs (rfftn)
>> - Orthonormal transforms (norm=’ortho’ argument)
>> - Bluestein’s algorithm to avoid the worst case O(n^2) complexity of
>> FFTPACK
>>
>>
>>
>> A few implementation details worth noting:
>>
>> - Unlike NumPy’s version of pocketfft, this is C++ and uses templates
>> to supporting the different floating point types
>> - pocketfft also uses pybind11 which both adds a new build-time
>> dependency and requires C++11. I believe this is the first use of C++11 in
>> SciPy.
>>
>> I've looked into this a little more. Compiler support for pybind11 is
> given in https://github.com/pybind/pybind11#supported-compilers.
>
> MSVC 2015 Update 3 seems compatible with the lowest version we need as far
> as I can tell (Python 3.5/3.6 require MSVC 14.0 == 2015; the "Update 3"
> part should be fine).
>
> GCC 4.8 is already the minimum we need today I believe.
>
> Minimum Clang versions needed are from 2013, so that's fine too.
>
> For Intel compilers a version from 2016 is needed. I think we're fine
> requiring a more recent version of the Intel compilers.
>
> For more exotic platforms, recent enough GCC versions will also do the
> job. So good to go I think.
>
So far pybind11 seems to have worked fine, except that it's not yet
documented in all our build instructions (there's open PRs for this though,
it's just waiting for Matt's larger devdocs overhaul), and that we seem to
require a fairly recent version of pybind11.
If there's any other missing docs or concerns, please bring them up here.
Cheers,
Ralf
>
>> - pocketfft has optional support for multithreading using OpenMP but
>> this is currently disabled (and not compiled in at all).
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20190704/88874110/attachment.html>
More information about the SciPy-Dev
mailing list