Contribute Media
A thank you to everyone who makes this possible: Read More

DAFunctor: Symbolic translator from NumPy/PyTorch ND-Array operations to C – Buganini (PyCon TW21)


Day 1, 10:40-11:25


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.

Slides: HackMD:

Speaker: Buganini

Pythonista since 2008


Improve this page