Repository navigation
Conversation
|
Thanks for the interest @mwyau. This doesn't work as long as DLPack doesn't support it, and as I commented on dmlc/dlpack#185 (comment),
You may also be interested in https://github.com/numpy/numpy-quaddtype, which is a proper 128-bit dtype and will hopefully supersede numpy's longdouble dtype. |
|
Yeah it works (assuming the But that doesn't answer if we actually should do it. On the other hand, EDIT: To be clear, it may be possible to convince me, but in practice the |
|
@rgommers I should have rephrased my wording, this is not about adding ducc use C++ ducc's FFT module is a continuation of pocketfft by the same author. pocketfft/ducc is numpy and scipy's FFT backend: https://github.com/numpy/numpy/blob/88ddb9806d42f6a96dca9fa0870092d679117258/numpy/fft/_pocketfft.py https://github.com/numpy/numpy/blob/88ddb9806d42f6a96dca9fa0870092d679117258/numpy/fft/_pocketfft_umath.cpp And I do think there are use cases for high precision FFT support through I have also opened a |
I see, of course, that it currently uses |
|
BTW, both |
|
This is more general than Both It will be nice if Numpy can accept real IEEE binary128 directly, if not they can be passed through PEP 3118 buffer protocol. Here is how
|
|
In other words, for portable builds one cannot use Note that nanobind already supports any floating-point type that DLPack supports, including IEEE binary128. If DLPack chooses to support complex binary128, nanobind will support it too. The problem with the last one is DLPack. See dmlc/dlpack#73 The problem with the buffer protocol is that PEP 3118 is marked as a historical document and advises the reader to refer to up-to-date canonical documentation. The type codes for My advice would be to try to revive interest in dmlc/dlpack#73 Is there any ARM hardware that supports IEEE binary128 arithmetic?
|
I am aware that the ARM hardware does not support IEEE binary128 arithmetic. But Linux AArch64 is the only mainstream platform that support IEEE binary128 data type. |
|
Huh? Most people would consider Linux |
|
Well, let me ignore the "do we even want to improve longdouble" part... Doing this still seems unclear. You basically just support one toolchain/system setup that happens to use IEEE 128bit floats for longdouble, while on all other platforms there is no gain. And on the platform where it does work, it could get confusing if you mix in
|
|
@seberg @rgommers
The use case is:
Separately I will look into how to use |
af870ee to
e5d4c01
Compare
|
I have looked into this a bit more, and indeed importing
This PR fills in the missing piece that |
|
Currently, I don't think there is any agreement that doing this is even helpful (i.e. quaddtype is more obvious) as it would be only a rather niche platform actually using it. So I'll close it as I don't really see it going anywhere at quite this time. Happy to keep the discussion up/re-open, but I think |
PR summary
Export IEEE binary128 to DLPack
kDLFloat, only on platforms wherelongdouble/float128is already IEEE binary128.nanobindcan then import the variables as IEEE binary128.longdouble, it will throw aBufferError, same as the current behavior.Validation
First time committer introduction
duccand scipy.AI Disclosure