MLIR Compiler Infrastructure

MLIR Compiler Infrastructure

mlir.llvm.org

3

About this website

MLIR (Multi-Level Intermediate Representation) is a free and open-source extensible compiler infrastructure and intermediate representation (IR) framework that enables the construction of reusable and extensible compiler IRs for domain-specific compilers. Developed by Chris Lattner (creator of LLVM and Swift) and Mehdi Amini at Google in 2019, MLIR is part of the LLVM Compiler Infrastructure Project and has been adopted by TensorFlow, PyTorch (via Torch-MLIR), JAX, Mojo, Flang (Fortran compiler), IREE (ML execution runtime), Circt (hardware synthesis), and many other compiler projects. Key features: extensible IR: unlike LLVM IR which is fixed, MLIR allows users to define custom dialects (sets of operations, types, and attributes) for different abstraction levels and domains, all within the same compilation framework. Dialects: MLIR ships with many standard dialects including func (functions), scf (structured control flow), cf (control flow), arith (arithmetic), math (math functions), memref (memory buffers), tensor (tensors), vector (SIMD vectors), linalg (linear algebra), affine (polyhedral), gpu (GPU kernels), async (asynchronous execution), LLVM IR dialect, SPIR-V dialect, and many more. Users can define their own dialects for domain-specific optimization. Dialect conversion: a powerful pass infrastructure for translating between dialects (lowering) via pattern-based rewriting, enabling progressive lowering from high-level domain-specific representations to low-level machine code. Infrastructure: MLIR provides reusable compiler infrastructure including pattern rewriting, dominator analysis, dataflow analysis, CSE (common subexpression elimination), DCE (dead code elimination), inlining, loop fusion, and tiling. Attributes and types: a rich type system supporting parameterized types, ranked/unranked tensors, memrefs with layout maps, and custom types. Testing infrastructure (FileCheck). Python bindings. Cross-platform. Apache-2.0 (with LLVM exceptions).

Tags & Categories

Statistics

3
Views
0
Clicks
0
Like
0
Dislike

Comments

Log In to post a comment

No comments yet. Be the first!