English

Composable and Modular Code Generation in MLIR: A Structured and Retargetable Approach to Tensor Compiler Construction

Programming Languages 2022-02-08 v1

Abstract

Despite significant investment in software infrastructure, machine learning systems, runtimes and compilers do not compose properly. We propose a new design aiming at providing unprecedented degrees of modularity, composability and genericity. This paper discusses a structured approach to the construction of domain-specific code generators for tensor compilers, with the stated goal of improving the productivity of both compiler engineers and end-users. The approach leverages the natural structure of tensor algebra. It has been the main driver for the design of progressive lowering paths in \MLIR. The proposed abstractions and transformations span data structures and control flow with both functional (SSA form) and imperative (side-effecting) semantics. We discuss the implications of this infrastructure on compiler construction and present preliminary experimental results.

Keywords

Cite

@article{arxiv.2202.03293,
  title  = {Composable and Modular Code Generation in MLIR: A Structured and Retargetable Approach to Tensor Compiler Construction},
  author = {Nicolas Vasilache and Oleksandr Zinenko and Aart J. C. Bik and Mahesh Ravishankar and Thomas Raoux and Alexander Belyaev and Matthias Springer and Tobias Gysi and Diego Caballero and Stephan Herhut and Stella Laurenzo and Albert Cohen},
  journal= {arXiv preprint arXiv:2202.03293},
  year   = {2022}
}
R2 v1 2026-06-24T09:24:24.074Z