Numerical code generation from symbolic expressions in Python

Fabio Rossi

email: fabio.rossi@inaf.it

Github: https://github.com/FabioRossiArcetri

This work was developed in the context of the simulations for the MAVIS/VLT instrument

MAVIS simulations team @Arcetri:

“Astrobigné” presentation, Arcetri 06/10/2020

Introduction

Motivation

Motivation

Approach outline

Software Stack

SEEING: Sympy Expressions Evaluation Implemented oN the GPU

SEEING Overview

Using SEEING for MAVIS Simulations

Sympy Lambdify

Problem

This is interesting, now what?

More details about NumPy, Cupy, Sympy and the development of SEEING

Array programming

What is a ufunc

Array programming on the GPU with CuPy

What is a lambda?

Adding some functionalities to SymPy

Appendix A: 5 minutes intro to Sympy

Appendix B: 5 minutes intro to CuPy

How to:

Appendix C: Performance comparison: Python vs NumPy vs Cupy