See the previous published edition.
Welcome to the twenty-fourth 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!
- Twice daily, automated preview releases of the MLIR and IREE Python API binaries (for Linux, MacOS, and Windows) enabled, illustrating the potential for some nice cross-ecosystem interop (JAX+XLA+MHLO+IREE, MLIR+MHLO+IREE, TFLite+TOSA). Several quality of life issues surfaced that will be addressed over the next couple of weeks.
- On LLVM-dev: [RFC] Modernize CMake LLVM “Components”/libLLVM Facility]([llvm-dev] [RFC] Modernize CMake LLVM "Components"/libLLVM Facility) (spun off from [Meeting Notes] MLIR Build/Install and Shared Libraries)
- mlir-opt can now run the pipeline described by a pass manager reproducer.
- Several methods on
OpState(the base class of each derived Op type) have been marked as deprecated as they are simple forwards to the same method on
- Uses of these methods should use
- Uses of these methods should use
- Passes can now override an
initialize(MLIRContext *context)hook that allows for initializing complex/heavy state before a pass pipeline is run.
- This is useful for situations like PDL, where there is a large upfront initialization cost that should only be incurred once and then shared across all copies of the pass.
getTypemethod of single result operations now has a more concrete return type, e.g.
removeAttrmethods are now generated that allow for removing an attribute from an operation.
- TypeDef instances can now specify builders similarly to operations.
Optimizations and Code Generation
- Vectorization was added to linalg-on-tensor operations
- The LLVM dialect saw the [addition of fast-math flags](([mlir] Add fastmath flags support to some LLVM dialect ops · llvm/llvm-project@c1d58c2 · GitHub)
- The sparse compiler continues to make progress: [mlir][sparse] adjust output shape inference to new tensor abstraction · llvm/llvm-project@8b124c1 · GitHub
- @george has been submitting an [RFC] Converting multi-threaded SPIR-V to LLVM dialect: overview
spv.SpecConstantOperationis supported in serialization and deserialzation.
- SPIR-V dialect gains two new trait:
SPIRVOpLoweringis replaced by
OpConversionPatternto rely more on core dialect conversion framework.
- More refactoring changes have landed to improve SPIR-V deserialization code structure and compilation speed.
The Python bindings continue to get more additions:
In the Ecosystem
mlir-npcomp: Prototype for compiling numpy programs
- npcomp deleted its original Python API and switched to the upstream MLIR Python API developed to replace it.
CIRCT : Circuit IR Compilers and Tools aka ‘MLIR for hardware’
- Initial documentation for FIRRTL, RTL/SV, and Handshake Dialect was started.
- In the Weekly discussion meeting on January 6, 2021, Mike presented slides on the proposed NPComp to Static Hardware pipeline.
- Verilog Emitter pass for FIRRTL dialect was introduced. This new -emit-firrtl-verilog pass is a clone of the existing -emit-verilog pass with all the RTL/SV support stripped out.
- FIRRTLToRTL gets lowering for reg, reginit, mem, skip, dshlw ops, file boilerplate macros, and a few related issues (364, 366, 367, 355, 373) were fixed by Chris Lattner.
- Struct support for RTL introduced four new Ops named struct_explode, struct_create, struct_inject, struct_extract.
- rtl.merge op was added to RTL dialect which merges signals together as if connected by a wire.
- The slides and videos for the 6th LLVM Compiler Infrastructure in HPC workshop are online, including @joker-eph’s keynote MLIR: an Agile Infrastructure for Building a Compiler Ecosystem (video / slides).
See also a few talks about ML applied to compilers, as well as Hal Finkel’s talk on Really Embedding Domain-Specific Languages into C++: is there a connection to MLIR here? Could we plug DSLs in C++ and lower them to MLIR inside Clang?