Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/3579990.3580008acmconferencesArticle/Chapter ViewAbstractPublication PagescgoConference Proceedingsconference-collections
research-article

Lifting Code Generation of Cardiac Physiology Simulation to Novel Compiler Technology

Published: 22 February 2023 Publication History

Abstract

The study of numerical models for the human body has become a major focus of the research community in biology and medicine. For instance, numerical ionic models of a complex organ, such as the heart, must be able to represent individual cells and their interconnections through ionic channels, forming a system with billions of cells, and requiring efficient code to handle such a large system. The modeling of the electrical system of the heart combines a compute-intensive kernel that calculates the intensity of current flowing through cell membranes, and feeds a linear solver for computing the electrical potential of each cell.
Considering this context, we propose limpetMLIR, a code generator and compiler transformer to accelerate the kernel phase of ionic models and bridge the gap between compiler technology and electrophysiology simulation. LimpetMLIR makes use of the MLIR infrastructure, its dialects, and transformations to drive forward the study of ionic models, and accelerate the execution of multi-cell systems. Experiments conducted in 43 ionic models show that our limpetMLIR based code generation greatly outperforms current state-of-the-art simulation systems by an average of 2.9x, reaching peak speedups of more than 15x in some cases. To our knowledge, this is the first work that deeply connects an optimizing compiler infrastructure to electrophysiology models of the human body, showing the potential benefits of using compiler technology in the simulation of human cell interactions.

References

[1]
2021. EasyML. https://opencarp.org/documentation/examples/01_ep_single_cell/05_easyml
[2]
Gene M Amdahl. 1967. Validity of the single processor approach to achieving large scale computing capabilities. In Proceedings of the April 18-20, 1967, spring joint computer conference. 483–485.
[3]
Cédric Augonnet, Samuel Thibault, Raymond Namyst, and Pierre-André Wacrenier. 2011. StarPU: A Unified Platform for Task Scheduling on Heterogeneous Multicore Architectures. CCPE - Concurrency and Computation: Practice and Experience, Special Issue: Euro-Par 2009, 23 (2011), Feb., 187–198. https://doi.org/10.1002/cpe.1631
[4]
Aart JC Bik, Penporn Koanantakool, Tatiana Shpeisman, Nicolas Vasilache, Bixia Zheng, and Fredrik Kjolstad. 2022. Compiler Support for Sparse Tensor Computations in MLIR. arXiv preprint arXiv:2202.04305.
[5]
BN Biswas, Somnath Chatterjee, SP Mukherjee, and Subhradeep Pal. 2013. A discussion on Euler method: A review. Electronic Journal of Mathematical Analysis and Applications, 1, 2 (2013), 2090–2792.
[6]
Uday Bondhugula. 2020. High performance code generation in mlir: An early case study with gemm. arXiv preprint arXiv:2003.00532.
[7]
Michael Clerx, Pieter Collins, Enno de Lange, and Paul G.A. Volders. 2016. Myokit: A simple interface to cardiac cellular electrophysiology. Progress in Biophysics and Molecular Biology, 120, 1 (2016), 100–114. issn:0079-6107 https://doi.org/10.1016/j.pbiomolbio.2015.12.008 Recent Developments in Biophysics & Molecular Biology of Heart Rhythm
[8]
R. Cytron, J. Ferrante, B. K. Rosen, M. N. Wegman, and F. K. Zadeck. 1989. An Efficient Method of Computing Static Single Assignment Form. In Proceedings of the 16th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’89). Association for Computing Machinery, New York, NY, USA. 25–35. isbn:0897912942 https://doi.org/10.1145/75277.75280
[9]
Tobias Gysi, Christoph Müller, Oleksandr Zinenko, Stephan Herhut, Eddie Davis, Tobias Wicky, Oliver Fuhrer, Torsten Hoefler, and Tobias Grosser. 2021. Domain-Specific Multi-Level IR Rewriting for GPU: The Open Earth Compiler for GPU-Accelerated Climate Simulation. ACM Trans. Archit. Code Optim., 18, 4 (2021), Article 51, sep, 23 pages. issn:1544-3566 https://doi.org/10.1145/3469030
[10]
Ernst Hairer, Syvert P. Norsett, and Gerhard Wanner. 1993. Solving Ordinary Differential Equations I. Nonstiff Problems (2nd rev. ed. 1993. corr. 3rd printing ed.). Springer, Berlin. isbn:978-3-540-56670-0 https://archive-ouverte.unige.ch/unige:12346 ID: unige:12346
[11]
Michael Hucka, Andrew Finney, Herbert M Sauro, Hamid Bolouri, John C Doyle, Hiroaki Kitano, Adam P Arkin, Benjamin J Bornstein, Dennis Bray, and Athel Cornish-Bowden. 2003. The systems biology markup language (SBML): a medium for representation and exchange of biochemical network models. Bioinformatics, 19, 4 (2003), 524–531.
[12]
Ryan Kabrick, Diego A Roa Perdomo, Siddhisanket Raskar, Jose M Monsalve Diaz, Dawson Fox, and Guang R Gao. 2020. CODIR: towards an MLIR codelet model dialect. In 2020 IEEE/ACM Fourth Annual Workshop on Emerging Parallel and Distributed Runtime Systems and Middleware (IPDRM). 33–40.
[13]
Navdeep Katel, Vivek Khandelwal, and Uday Bondhugula. 2022. MLIR-Based Code Generation for GPU Tensor Cores. In Proceedings of the 31st ACM SIGPLAN International Conference on Compiler Construction (CC 2022). Association for Computing Machinery, New York, NY, USA. 117–128. isbn:9781450391832 https://doi.org/10.1145/3497776.3517770
[14]
Klaus Kofler, Biagio Cosenza, and Thomas Fahringer. 2015. Automatic data layout optimizations for gpus. In European Conference on Parallel Processing. 263–274.
[15]
Chris Lattner, Mehdi Amini, Uday Bondhugula, Albert Cohen, Andy Davis, Jacques Pienaar, River Riddle, Tatiana Shpeisman, Nicolas Vasilache, and Oleksandr Zinenko. 2021. Mlir: Scaling compiler infrastructure for domain specific computation. In 2021 IEEE/ACM International Symposium on Code Generation and Optimization (CGO). 2–14.
[16]
Catherine M Lloyd, Matt DB Halstead, and Poul F Nielsen. 2004. CellML: its future, present and past. Progress in biophysics and molecular biology, 85, 2-3 (2004), 433–450.
[17]
Anders Logg, Kristian B Ø lgaard, Marie E Rognes, and Garth N Wells. 2012. FFC: the FEniCS form compiler. In Automated Solution of Differential Equations by the Finite Element Method. Springer, 227–238.
[18]
Martin Lücke, Michel Steuwer, and Aaron Smith. 2021. Integrating a functional pattern-based IR into MLIR. In Proceedings of the 30th ACM SIGPLAN International Conference on Compiler Construction. 12–22.
[19]
Megan E Marsh, Saeed Torabi Ziaratgahi, and Raymond J Spiteri. 2012. The secrets to the success of the Rush–Larsen method and its generalizations. IEEE transactions on biomedical engineering, 59, 9 (2012), 2506–2515.
[20]
Alexander McCaskey and Thien Nguyen. 2021. A MLIR Dialect for Quantum Assembly Languages. In 2021 IEEE International Conference on Quantum Computing and Engineering (QCE). 255–264.
[21]
Gary R Mirams, Christopher J Arthurs, Miguel O Bernabeu, Rafel Bordas, Jonathan Cooper, Alberto Corrias, Yohan Davit, Sara-Jane Dunn, Alexander G Fletcher, and Daniel G Harvey. 2013. Chaste: an open source C++ library for computational physiology and biology. PLoS computational biology, 9, 3 (2013), e1002970.
[22]
Sparsh Mittal. 2016. A survey of techniques for approximate computing. ACM Computing Surveys (CSUR), 48, 4 (2016), 1–33.
[23]
William S Moses, Lorenzo Chelini, Ruizhe Zhao, and Oleksandr Zinenko. 2021. Polygeist: Raising C to Polyhedral MLIR. In 2021 30th International Conference on Parallel Architectures and Compilation Techniques (PACT). 45–59.
[24]
Erdal Mutlu, Ruiqin Tian, Bin Ren, Sriram Krishnamoorthy, Roberto Gioiosa, Jacques Pienaar, and Gokcen Kestor. 2020. Comet: A domain-specific compilation of high-performance computational chemistry. In International Workshop on Languages and Compilers for Parallel Computing. 87–103.
[25]
Pras Pathmanathan and Richard A Gray. 2013. Verification of computational models of cardiac electro-physiology. Int J Numer Method Biomed Eng, 30, 5 (2013), Nov., 525–544.
[26]
Gernot Plank, Axel Loewe, Aurel Neic, Christoph Augustin, Yung-Lin Huang, Matthias A.F. Gsell, Elias Karabelas, Mark Nothstein, Anton J. Prassl, Jorge Sánchez, Gunnar Seemann, and Edward J. Vigmond. 2021. The openCARP simulation environment for cardiac electrophysiology. Computer Methods and Programs in Biomedicine, 208 (2021), 106223. issn:0169-2607 https://doi.org/10.1016/j.cmpb.2021.106223
[27]
S Rush and H Larsen. 1978. A practical algorithm for solving dynamic membrane equations. IEEE Trans Biomed Eng, 25, 4 (1978), July, 389–392.
[28]
Keshav Santhanam, Siddharth Krishna, Ryota Tomioka, Andrew Fitzgibbon, and Tim Harris. 2021. DistIR: An Intermediate Representation for Optimizing Distributed Neural Networks. In Proceedings of the 1st Workshop on Machine Learning and Systems (EuroMLSys ’21). Association for Computing Machinery, New York, NY, USA. 15–23. isbn:9781450382984 https://doi.org/10.1145/3437984.3458829
[29]
Lukas Sommer, Cristian Axenie, and Andreas Koch. 2022. SPNC: An Open-Source MLIR-Based Compiler for Fast Sum-Product Network Inference on CPUs and GPUs. In 2022 IEEE/ACM International Symposium on Code Generation and Optimization (CGO). 1–11. https://doi.org/10.1109/CGO53902.2022.9741277
[30]
Joakim Sundnes, Robert Artebrant, Ola Skavhaug, and Aslak Tveito. 2009. A second-order algorithm for solving dynamic cell membrane equations. IEEE Transactions on Biomedical Engineering, 56, 10 (2009), 2546–2548.
[31]
Arun Thangamani, Tiago Trevisan Jost, Vincent Loechner, Stéphane Genaud, and Bérenger Bramas. 2023. Artifact for Lifting Code Generation of Cardiac PhysiologySimulation to Novel Compiler Technology. https://doi.org/10.1145/3554349
[32]
Ruiqin Tian, Luanzheng Guo, Jiajia Li, Bin Ren, and Gokcen Kestor. 2021. A High Performance Sparse Tensor Algebra Compiler in MLIR. In 2021 IEEE/ACM 7th Workshop on the LLVM Compiler Infrastructure in HPC (LLVM-HPC). 27–38. https://doi.org/10.1109/LLVMHPC54804.2021.00009
[33]
Nicolas Vasilache, Oleksandr Zinenko, Aart J. C. Bik, Mahesh Ravishankar, Thomas Raoux, Alexander Belyaev, Matthias Springer, Tobias Gysi, Diego Caballero, Stephan Herhut, Stella Laurenzo, and Albert Cohen. 2022. Composable and Modular Code Generation in MLIR: A Structured and Retargetable Approach to Tensor Compiler Construction. CoRR, abs/2202.03293 (2022), arXiv:2202.03293. arxiv:2202.03293
[34]
Nicolas Weber and Michael Goesele. 2014. Auto-Tuning Complex Array Layouts for GPUs. In EGPGV@ EuroVis. 57–64.
[35]
Samuel Williams, Andrew Waterman, and David Patterson. 2009. Roofline: an insightful visual performance model for multicore architectures. Commun. ACM, 52, 4 (2009), 65–76.

Cited By

View all
  • (2024)Performance Portability of Generated Cardiac Simulation Kernels Through Automatic Dimensioning and Load Balancing on Heterogeneous Nodes2024 IEEE International Parallel and Distributed Processing Symposium Workshops (IPDPSW)10.1109/IPDPSW63119.2024.00171(1006-1015)Online publication date: 27-May-2024

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
CGO '23: Proceedings of the 21st ACM/IEEE International Symposium on Code Generation and Optimization
February 2023
262 pages
ISBN:9798400701016
DOI:10.1145/3579990
Publication rights licensed to ACM. ACM acknowledges that this contribution was authored or co-authored by an employee, contractor or affiliate of a national government. As such, the Government retains a nonexclusive, royalty-free right to publish or reproduce this article, or to allow others to do so, for Government purposes only.

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 22 February 2023

Permissions

Request permissions for this article.

Check for updates

Badges

Author Tags

  1. Code generation and optimization
  2. code transformation
  3. domain-specific languages
  4. vectorization

Qualifiers

  • Research-article

Funding Sources

  • European High-Performance Computing Joint Undertaking

Conference

CGO '23

Acceptance Rates

Overall Acceptance Rate 312 of 1,061 submissions, 29%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)100
  • Downloads (Last 6 weeks)8
Reflects downloads up to 24 Sep 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Performance Portability of Generated Cardiac Simulation Kernels Through Automatic Dimensioning and Load Balancing on Heterogeneous Nodes2024 IEEE International Parallel and Distributed Processing Symposium Workshops (IPDPSW)10.1109/IPDPSW63119.2024.00171(1006-1015)Online publication date: 27-May-2024

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media