Optimized Code Generation of Electrophysiology Kernels using MLIR - Inria - Institut national de recherche en sciences et technologies du numérique
Communication Dans Un Congrès Année : 2024

Optimized Code Generation of Electrophysiology Kernels using MLIR

Résumé

MLIR is a novel 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 European project (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.
Fichier non déposé

Dates et versions

hal-04715152 , version 1 (30-09-2024)

Licence

Identifiants

  • HAL Id : hal-04715152 , version 1

Citer

Vincent Loechner. Optimized Code Generation of Electrophysiology Kernels using MLIR. Workshop on Compiler-assisted Correctness Checking and Performance Optimization for HPC (C3PO), May 2024, Hambourg, Germany. ⟨hal-04715152⟩
0 Consultations
0 Téléchargements

Partager

More