DAFunctor: Symbolic translator from NumPy/PyTorch ND-Array operations to C

Buganini

Buganini

icon-location R2
icon-language Chinese talk w. English slides
icon-datetime Day 1 • 10:40-11:25
icon-level Experienced
icon-category Other

    Abstract

    DAFunctor aims to reduce the increasing gap between science and engineering. ND-Array is a crucial part of modern algorithm design. It reduces the mental burden for designers and bypasses Python's slow loop. However, using lower-level languages like C/C++ is sometimes unavoidable on productization. Some strict development guidelines like MISRA even forbid dynamic memory allocation, making engineering more difficult. Manual translation to C/C++ usually introduces human errors. Other function-to-function auto translators generate lots of boilerplate code and require many intermediate buffers. On the contrary symbolic translation generates only the essential logic. Imperative programming style makes the performance directly depends on the implementation; symbolic translation can also eliminate part of the inefficiency caused by the programmer, thus make benchmarking more normalized. The making of DAFunctor also involves fun low-level hacks on the Python interpreter.

    Description

    Video

    Buganini

    Pythonista since 2008