beandeau>
Code Generation of Electrophysiology Kernels using MLIR
Vincent Loechner  1, *@  
1 : Laboratoire des sciences de l'ingénieur, de l'informatique et de l'imagerie
Ecole Nationale du Génie de l'Eau et de l'Environnement de Strasbourg, université de Strasbourg, ICube UMR7357, Strasbourg, France
* : Auteur correspondant

MLIR is a compiler technology that permits to take control of the compiler IR in an easy and flexible way: the Multi-Level Intermediate Representation can mix various IRs to (1) represent your input program and (2) control the compiler code generation, at a small development cost. MLIR outputs LLVM IR that can be adapted to the architectural needs for better performance, without having to write complex LLVM passes and insert them into the pass manager. This talk will relate our experience with MLIR in the MICROCARD EuroHPC funded Centre of Excellence (microcard.eu), to optimize a code of a real-life application: the electrophysiology kernels from the openCARP cardiac simulator (opencarp.org). The ionic currents crossing the membranes of the heart cells are described using mathematical modelizations written in a domain specific language (DSL). These DSL programs were originally converted into C code by a python script, and compiled by a standard compiler. We modified this script to generate MLIR code, and generate both very efficient parallel and vector CPU codes, and GPU codes (CUDA for Nvidia and ROCm for AMD GPUs). I will present the MLIR dialects that we used for this, the MLIR transformation passes, and the performance results of our optimized code.


Chargement... Chargement...