See the previous published edition.
Welcome to the twenty-seventh issue of the MLIR (bi)Weekly, a newsletter 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!
Highlights
- The first end-to-end milestone of the sparse compiler was presented last week: see “Recent Talks” at the bottom and the Discourse thread: MLIR Support for Sparse Tensors
MLIR Core
Infrastructure
- Dialect interfaces can now be registered independently from the the dialect before loading. The dialect does not need to know about the interface, enabling simple extensions to existing dialects.
- Translation to LLVM IR is now based on dialect interfaces and is therefore extensible to any dialects, including out-of-tree ones.
- Initial alias-analysis framework has landed.
- The C API can now walk the IR up the tree
- A floating point fused multiply-add operation was added to the standard dialect.
- Debug Actions infrastructure in MLIR is landing.
- Debug Counters are now supported in MLIR using the debug action framework.
- Attribute/Type::getChecked and verifyConstructionInvariants are being refactored to be cleaner and more efficient.
Table-driven Infrastructure
- Declarative operation format specification now supports a general
ref
directive, replacingtype_ref
, that allows for referencing most components of an operation within a custom directive.
Optimizations and Code Generation
- Affine loop fusion now supports producer-consumer loop fusion with multiple producer stores. This new feature extends loop fusion applicability to more generic cases: https://reviews.llvm.org/D92876
- Vector
contract
andouterproduct
received the addition of a “kind” to specify the “join” operation performed in the reduction. - A new
linal.tiled_loop
operation was added, see [RFC] Add Linalg TileOp for more info. - Multiple lowering were added to map the TOSA dialect to Linalg (here for example).
CPU codegen
- A pass to provide expansions of math operation into fast polynomial approximation was added, this is based on Eigen and Cephes.
SPIR-V
- More types and ops were defined to support graphics use cases.
- More patterns were added to convert vector ops to SPIR-V ops.
- SPIR-V serializer was split into multiple source files, in preparation for later refactoring to have better internal structures.
Other
- The support for the
!llvm
prefix forbuilt-in
type is removed. As a reminder the LLVM dialect is now using directly the builtin types when possible. - The split of the standard dialect continues with the extraction of the
math
and memref dialects. - The C++ runtime for the MLIR JIT/ExecutionEngine gets additions:
- Python bindings were added for AffineMap
In the Ecosystem
Flang, the LLVM Fortran Compiler
- Support for -fopenmp and -fopenacc was added into the flang driver.
- fir-opt tool was added, it will be used for passes and roundtrip testing.
TensorFlow / MLIR-HLO
- XLA GPU backend: All emitters are migrated to take LMHLO as input (individually, still need to glue them together):
- Fused Slice
- CollectivePermute
- FFT
- TriangularSolve
- Fused Scatter
- Bitcast
- Kernel Generator:
- Multiple performance tweaks that fix the broadcasting performance.
- Identified a missing host side optimization that Eigen performs: In broadcasting cases, Eigen computes a minimal broadcasted shape to reduce the number of dimensions of the tensor that is being computed. We are adding support for this, as well.
- We have launched a few more unary kernels and our first launched binary kernel is faring well. We will start landing the other ones next.
CIRCT : Circuit IR Compilers and Tools aka ‘MLIR for hardware’
- A new
comb
dialect is created and all the RTL combinational ops moves into it. - During ODMs John Demme presented Endianness rationale and Rajit Manohar talked about Asynchronous design.
Recent Talks
- 2021-02-11: Polygeist: An affine C frontend for MLIR ; slides - recording
- 2021-02-18 Compiler Support for Sparse Tensor Computations: A Status Update ; slides - recording
Recent Publications
- A High-Performance Sparse Tensor Algebra Compiler in Multi-Level IR ; this is sparse extension to COMET (see previous presentation: “Domain Specific Compilation for Computational Chemistry” ; slides - recording)