pith. sign in

arxiv: 2404.15204 · v1 · pith:YMQHN23Fnew · submitted 2024-04-15 · 💻 cs.PL · cs.AI· cs.AR· cs.DC· cs.LG

Towards a high-performance AI compiler with upstream MLIR

classification 💻 cs.PL cs.AIcs.ARcs.DCcs.LG
keywords algebracompilerflowincludinglinearloweringmlirpasses
0
0 comments X
read the original abstract

This work proposes a compilation flow using open-source compiler passes to build a framework to achieve ninja performance from a generic linear algebra high-level abstraction. We demonstrate this flow with a proof-of-concept MLIR project that uses input IR in Linalg-on-Tensor from TensorFlow and PyTorch, performs cache-level optimizations and lowering to micro-kernels for efficient vectorization, achieving over 90% of the performance of ninja-written equivalent programs. The contributions of this work include: (1) Packing primitives on the tensor dialect and passes for cache-aware distribution of tensors (single and multi-core) and type-aware instructions (VNNI, BFDOT, BFMMLA), including propagation of shapes across the entire function; (2) A linear algebra pipeline, including tile, fuse and bufferization strategies to get model-level IR into hardware friendly tile calls; (3) A mechanism for micro-kernel lowering to an open source library that supports various CPUs.

This paper has not been read by Pith yet.

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Forward citations

Cited by 1 Pith paper

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score.

  1. Reading AI Model Compilation in MLIR Through the Lens of Formal Theories

    cs.PL 2026-06 unverdicted novelty 3.0

    MLIR concepts such as match-and-rewrite and staged lowering correspond to established formal theories, providing a basis for more principled abstraction design in compiler infrastructure.