High-performance symbolic-numerics via multiple dispatch

05/09/2021
by   Shashi Gowda, et al.
0

As mathematical computing becomes more democratized in high-level languages, high-performance symbolic-numeric systems are necessary for domain scientists and engineers to get the best performance out of their machine without deep knowledge of code optimization. Naturally, users need different term types either to have different algebraic properties for them, or to use efficient data structures. To this end, we developed Symbolics.jl, an extendable symbolic system which uses dynamic multiple dispatch to change behavior depending on the domain needs. In this work we detail an underlying abstract term interface which allows for speed without sacrificing generality. We show that by formalizing a generic API on actions independent of implementation, we can retroactively add optimized data structures to our system without changing the pre-existing term rewriters. We showcase how this can be used to optimize term construction and give a 113x acceleration on general symbolic transformations. Further, we show that such a generic API allows for complementary term-rewriting implementations. We demonstrate the ability to swap between classical term-rewriting simplifiers and e-graph-based term-rewriting simplifiers. We showcase an e-graph ruleset which minimizes the number of CPU cycles during expression evaluation, and demonstrate how it simplifies a real-world reaction-network simulation to halve the runtime. Additionally, we show a reaction-diffusion partial differential equation solver which is able to be automatically converted into symbolic expressions via multiple dispatch tracing, which is subsequently accelerated and parallelized to give a 157x simulation speedup. Together, this presents Symbolics.jl as a next-generation symbolic-numeric computing environment geared towards modeling and simulation.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
09/12/2016

Devito: Towards a generic Finite Difference DSL using Symbolic Python

Domain specific languages (DSL) have been used in a variety of fields to...
research
03/09/2021

ModelingToolkit: A Composable Graph Transformation System For Equation-Based Modeling

Getting good performance out of numerical equation solvers requires that...
research
02/14/2023

Autotuning Symbolic Optimization Fabrics for Trajectory Generation

In this paper, we present an automated parameter optimization method for...
research
12/03/2020

Graph Surfing in Reaction Systems from a Categorial Perspective

Graph-based reaction systems were recently introduced as a generalizatio...
research
05/12/2021

Composing Modeling and Simulation with Machine Learning in Julia

In this paper we introduce JuliaSim, a high-performance programming envi...
research
07/16/2023

Discovering a reaction-diffusion model for Alzheimer's disease by combining PINNs with symbolic regression

Misfolded tau proteins play a critical role in the progression and patho...
research
11/05/2021

MetaFEM: A Generic FEM Solver By Meta-expressions

Current multi-physics Finite Element Method (FEM) solvers are complex sy...

Please sign up or login with your details

Forgot password? Click here to reset