[Numpy-discussion] Looking for people interested in helping with Python compiler to LLVM

xavier.gnata at gmail.com xavier.gnata at gmail.com
Sun Mar 11 10:12:22 EDT 2012


It says : " Numba is a NumPy aware optimizing compiler for Python. It 
uses the remarkable LLVM compiler infrastructure to compile Python 
byte-code to machine code especially for use in the NumPy run-time and 
SciPy modules."*
*
If this description is correct, Numba is an additional pass once the 
cpython  bytecode has be produced by cpython.
Is it correct??
Is python bytecote a good intermediate representation to perform numpy 
related optimization?

One current big issue with numpy is that C=A+B+D produces temporaries.
numexpr addresses this issue and it would be great to get the same 
result by default in numpy.
numexpr also optimizes polynomials using Horner's method. It is hard to 
do that at bytecode level, isn't it?

Unladen swallow wanted to replace the full cpython implementation by a 
jit compiler built using LLVM...but unladen swallow is dead.

Xavier


> what is the difference to http://www.python.org/dev/peps/pep-3146/ ?
>
> On Sun, Mar 11, 2012 at 4:35 PM, Travis Oliphant <teoliphant at gmail.com 
> <mailto:teoliphant at gmail.com>> wrote:
>
>     Hey all,
>
>     I gave a lightning talk this morning on numba which is the start
>     of a Python compiler to machine code through the LLVM tool-chain.
>       It is proof of concept stage only at this point (use it only if
>     you are interested in helping develop the code at this point).  
>     The only thing that works is a fast-vectorize capability on a few
>     functions (without for-loops).   But, it shows how creating
>     functions in Python that can be used by the NumPy runtime in
>     various ways.   Several NEPS that will be discussed in the coming
>     months will use this concept.
>
>     Right now there is very little design documentation, but I will be
>     adding some in the days ahead, especially if I get people who are
>     interested in collaborating on the project.   I did talk to Fijal
>     and Alex of the PyPy project at PyCon and they both graciously
>     suggested that I look at some of the PyPy code which walks the
>     byte-code and does translation to their intermediate
>     representation for inspiration.
>
>     Again, the code is not ready for use, it is only proof of concept,
>     but I would like to get feedback and help especially from people
>     who might have written compilers before.  The code lives at:
>     https://github.com/ContinuumIO/numba
>
>     -Travis
>
>
>
>
>     _______________________________________________
>     NumPy-Discussion mailing list
>     NumPy-Discussion at scipy.org <mailto:NumPy-Discussion at scipy.org>
>     http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
>
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion




More information about the NumPy-Discussion mailing list