MLIR News, 6th edition (5/1/2020)

See the previous published edition.

Welcome to the sixth issue of the MLIR (bi)Weekly, a newsletter (published on Friday) covering developments in MLIR, and related projects in the ecosystem. MLIR (bi)Weekly is brought to you by a collective effort of contributors, we welcome your contributions!


  • TRFT, a new TensorFlow Runtime, is now open-sourced!
    This project was previously presented at a MLIR open-design meeting in March (slides - recording)
  • mlir-npcomp is a new project intended to prototype compiling numpy programs using MLIR.



Table-driven Infrastructure

  • EDSC implementation is undergoing significant simplification and aims to converge with core Builder APIs, according to the discussion.
  • ODS now generates accessors for mutating operands. <operand-name>Mutable returns a MutableOperandRange, which can be used to add/erase/set operands.

Optimizations and Code Generation

  • A pass of buffer assignment has been upstreamed from TensorFlow.
  • Linalg generic operations can now be lowered to parallel loops.
  • Named Linalg ops are now exercised via batched matmul op.
  • GPU modeling and lowering has been reinforced: gpu.func is now only allowed in gpu.module; a nested symbol-based scheme is used to reference launched kernels; multiple GPU modules can be processed in parallel during the lowering.
  • Affine analyses now support arbitrary ops as symbol scopes, not just functions.
  • Arbitrary ops can now be marked as automatic allocation scopes.
  • Vector dialect now supports masked transfers of nD vectors.
  • Multiple ops, including std.load/store and loops, now have memory effects.
  • ROCL dialect is being homogenized with other GPU target-specific dialects.


  • mlir-vulkan-runner supports integer buffers now.
  • Work in progress to improve non-32-bit type conversion from standard dialect.


In the Ecosystem

Flang, the LLVM Fortran Compiler

  • FIR (the MLIR-based Fortran IR) is getting integrated in the repo piece-by-piece: it was developed out-of-tree originally and wasn’t in the main flang branch when it got merged in the monorepo.

IREE : An Experimental MLIR Execution Environment

mlir-npcomp: Prototype for compiling numpy programs

Recent Talks

Recent Publications

In this paper, we propose the “Collection Virtual Machine” (or CVM) – an extensible compiler framework designed to keep the specialization process of data analytics systems tractable. It can capture at the same time the essence of a large span of low-level, hardware-specific implementation techniques as well as high-level operations of different types of analyses. At its core lies a language for defining nested, collection-oriented intermediate representations (IRs). Frontends produce programs in their IR flavors defined in that language, which get optimized through a series of rewritings (possibly changing the IR flavor multiple times) until the program is finally expressed in an IR of platform-specific operators.

They cite MLIR as “compiler framework aims to provide tools and abstractions for expressing, transforming, and composing of a wide range of intermediate rep- resentations and compilation to a broad range of hardware targets, including ML accelerators, but with a focus on deep learning on GPUs and TPUs” (this last part does not seem accurate).

1 Like