Short reminder: Transonic is a pure Python package (requiring Python >= 3.6) to easily accelerate modern Python-Numpy code with different accelerators (currently Cython, Pythran and Numba).
We've just reached an important technical milestone with the release of the 0.4.0 version.
If you use Pythran master, note that Transonic 0.4.0 is (on purpose) only compatible with the stable version of Pythran so one needs to install transonic with something like:
pip install https://github.com/fluiddyn/transonic/archive/master.zip
I consolidated the work of Pierre Blanc-fatin on the possibility to use different Python accelerators with the same Numpy code.
Different accelerators for one process and one module
Before 0.4.0, it was not possible to use more than one backend for one process! This strong limitation is now overcome. We now have an API to choose which backend is used for a specific module or function. For example, one can write something like:
import os from transonic import boost, set_backend_for_this_module if os.name == 'nt': # Windows backend = "numba" # or "cython" else: backend = "pythran" set_backend_for_this_module(backend) @boost def myfunc(...): ...
Since it is possible to choose with a fine granularity which backend is used for which function, it is now super easy to write benchmarks with Transonic.
I've done a big refactoring of how types are represented in Transonic (see for
We have now a flexible solution to tell for each backend how the Transonic
types are expressed. It is for example possible to define for the Cython
backend np.ndarray and memoryviews. Or to specify the memory layout of
arrays (C, Fortran, "C_or_F" or strided) or fixed dimensions (for example for
Technically, some ideas are listed in our roadmaps.
But it's now time to work on adoption (in particular for packages) and on building a "community" of users and developers.