Composable and Modular Code Generation in MLIR: A Structured and Retargetable Approach to Tensor Compiler Construction
Nicolas Vasilache, Oleksandr Zinenko, Aart J.C. Bik, Mahesh, Ravishankar, Thomas Raoux, Alexander Belyaev, Matthias Springer, Tobias Gysi,, Diego Caballero, Stephan Herhut, Stella Laurenzo, Albert Cohen

TL;DR
This paper introduces a structured, modular approach to building tensor compilers using MLIR, enhancing flexibility, reusability, and productivity for compiler developers and users.
Contribution
It presents a novel, structured design for tensor compiler code generators that improves modularity, composability, and genericity leveraging tensor algebra.
Findings
Improved modularity and composability in tensor compiler construction.
Preliminary experimental results demonstrate potential benefits.
Design facilitates progressive lowering paths in MLIR.
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.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
