High-performance symbolic-numerics via multiple dispatch

IF 0.4 Q4 MATHEMATICS, APPLIED ACM Communications in Computer Algebra Pub Date : 2021-05-09 DOI:10.1145/3511528.3511535
Shashi Gowda, Yingbo Ma, Alessandro Cheli, Maja Gwóźdź, Viral B. Shah, A. Edelman, Chris Rackauckas
{"title":"High-performance symbolic-numerics via multiple dispatch","authors":"Shashi Gowda, Yingbo Ma, Alessandro Cheli, Maja Gwóźdź, Viral B. Shah, A. Edelman, Chris Rackauckas","doi":"10.1145/3511528.3511535","DOIUrl":null,"url":null,"abstract":"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. Exploiting this feature, we demonstrate the ability to swap between classical term-rewriting simplifiers and e-graph-based term-rewriting simplifiers. We illustrate how this symbolic system improves numerical computing tasks by showcasing 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.","PeriodicalId":41965,"journal":{"name":"ACM Communications in Computer Algebra","volume":"55 1","pages":"92 - 96"},"PeriodicalIF":0.4000,"publicationDate":"2021-05-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"35","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"ACM Communications in Computer Algebra","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3511528.3511535","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q4","JCRName":"MATHEMATICS, APPLIED","Score":null,"Total":0}
引用次数: 35

Abstract

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. Exploiting this feature, we demonstrate the ability to swap between classical term-rewriting simplifiers and e-graph-based term-rewriting simplifiers. We illustrate how this symbolic system improves numerical computing tasks by showcasing 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.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
通过多个调度实现高性能的符号-数字
随着数学计算在高级语言中变得更加民主,高性能的符号数字系统对于领域科学家和工程师来说是必要的,他们可以在没有深入代码优化知识的情况下从机器中获得最佳性能。自然,用户需要不同的术语类型,要么具有不同的代数属性,要么使用高效的数据结构。为此,我们开发了Symbolics.jsl,这是一个可扩展的符号系统,它使用动态多重调度来根据域需求更改行为。在这项工作中,我们详细介绍了一个底层的抽象术语接口,它允许在不牺牲通用性的情况下提高速度。我们表明,通过在独立于实现的操作上正式化通用API,我们可以在不更改预先存在的术语重写器的情况下,向系统中追溯添加优化的数据结构。我们展示了如何使用它来优化术语结构,并在一般符号转换上给出113倍的加速。此外,我们展示了这样一个通用的API允许互补的术语评审实现。利用这一特性,我们展示了在经典的术语重写简化器和基于电子图的术语重写精简器之间进行交换的能力。我们展示了这个符号系统如何通过展示一个电子图规则集来改进数值计算任务,该规则集最大限度地减少了表达式评估过程中的CPU周期,并展示了它如何简化真实世界的反应网络模拟以将运行时间减半。此外,我们还展示了一个反应扩散偏微分方程求解器,该求解器能够通过多次调度跟踪自动转换为符号表达式,随后对其进行加速和并行化,以获得157x的模拟加速。这使Symbolics.jsl成为面向建模和仿真的下一代符号数字计算环境。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
CiteScore
0.70
自引率
0.00%
发文量
0
期刊最新文献
A Novel Application of Polynomial Solvers in mmWave Analog Radio Beamforming How to use a CAS for Hardware Design Automation Clustering in the Lazard method for Cylindrical Algebraic Decomposition Computing Almost-Commuting Basis of Ordinary Differential Operators Symmetry Adapted Bases for Trigonometric Optimization
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1