Re: [Numpy-discussion] Transonic Vision: unifying Python-Numpy accelerators

Thanks Ralf for this kind and interesting reply!
Yes, it seems evident now but I forgot to update the jit decorators when I was working on the boost decorator. My first "targets" for Transonic are packages for which the ahead-of-time mode seems more adapted. This incompatibility between the 2 main decorators used in Transonic will soon be fixed! Regarding the way to globally switch behavior, I'll open a dedicated issue.
As you've seen with the jit/boost incompatibility, I guess API design would be better if people knowing the subject could be included in some discussions. For example, I had to design the Python API for type declaration of arrays (see https://transonic.readthedocs.io/en/latest/generated/transonic.typing.html) since I didn't find anything adapted. My implementation is not great neither since types in transonic.typing and in `typing` are right now not compatible ! (However, it won't be difficult to fix that) Another API design that needs to be thought is about user-defined types in Transonic. This is for future because Pythran does not currently support that, but I think we will have to be able to support kind of dataclass, something like the equivalent of C struct (corresponding to Cython `cdef class` and Numba `jitclass`). A more theoretical subject that would be interesting to investigate is about the subset of Python-Numpy that can and should be implemented by accelerators. For example, I think a function having different branches with different types for the returned objects depending of runtime values cannot be rewritten as efficient modern C++. If you know people potentially interested to discuss about these subjects, please tell me. Cheers, Pierre

On Tue, Nov 12, 2019 at 1:09 PM PIERRE AUGIER < pierre.augier@univ-grenoble-alpes.fr> wrote:
This is indeed interesting, I've been thinking about this a lot and have a very rough first cut at what should be included ( https://github.com/Quansight-Labs/rnumpy). That should be redone next year with a better basis for decision-making of what should and should not be in it. For example, I think a function having different branches with different
types for the returned objects depending of runtime values cannot be rewritten as efficient modern C++.
Agreed. That's anyway due to sub-optimal design decisions long ago in most cases. Cheers, Ralf

On Tue, Nov 12, 2019 at 1:09 PM PIERRE AUGIER < pierre.augier@univ-grenoble-alpes.fr> wrote:
This is indeed interesting, I've been thinking about this a lot and have a very rough first cut at what should be included ( https://github.com/Quansight-Labs/rnumpy). That should be redone next year with a better basis for decision-making of what should and should not be in it. For example, I think a function having different branches with different
types for the returned objects depending of runtime values cannot be rewritten as efficient modern C++.
Agreed. That's anyway due to sub-optimal design decisions long ago in most cases. Cheers, Ralf
participants (2)
-
PIERRE AUGIER
-
Ralf Gommers