-
Compiler Support for Sparse Tensor Computations in MLIR
Authors:
Aart J. C. Bik,
Penporn Koanantakool,
Tatiana Shpeisman,
Nicolas Vasilache,
Bixia Zheng,
Fredrik Kjolstad
Abstract:
Sparse tensors arise in problems in science, engineering, machine learning, and data analytics. Programs that operate on such tensors can exploit sparsity to reduce storage requirements and computational time. Develo** and maintaining sparse software by hand, however, is a complex and error-prone task. Therefore, we propose treating sparsity as a property of tensors, not a tedious implementation…
▽ More
Sparse tensors arise in problems in science, engineering, machine learning, and data analytics. Programs that operate on such tensors can exploit sparsity to reduce storage requirements and computational time. Develo** and maintaining sparse software by hand, however, is a complex and error-prone task. Therefore, we propose treating sparsity as a property of tensors, not a tedious implementation task, and letting a sparse compiler generate sparse code automatically from a sparsity-agnostic definition of the computation. This paper discusses integrating this idea into MLIR.
△ Less
Submitted 9 February, 2022;
originally announced February 2022.
-
Composable and Modular Code Generation in MLIR: A Structured and Retargetable Approach to Tensor Compiler Construction
Authors:
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
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 th…
▽ More
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.
△ Less
Submitted 7 February, 2022;
originally announced February 2022.
-
A Note on Exhaustive State Space Search for Efficient Code Generation
Authors:
Aart J. C. Bik
Abstract:
This note explores state space search to find efficient instruction sequences that perform particular data manipulations. Once found, the instruction sequences are hard-wired in the code generator that needs these data manipulations. Since state space is only searched while develo** the compiler, search time is not at a premium, which allows exhaustively searching for the best possible instructi…
▽ More
This note explores state space search to find efficient instruction sequences that perform particular data manipulations. Once found, the instruction sequences are hard-wired in the code generator that needs these data manipulations. Since state space is only searched while develo** the compiler, search time is not at a premium, which allows exhaustively searching for the best possible instruction sequences.
△ Less
Submitted 24 June, 2021;
originally announced July 2021.