1 minute read

In the past few months, I have been learning to use MLIR. MLIR stands for Multi level Intermidate Representation. It is a compiler infrastructure framework mainly used for creating domain specific compilers. It was originally created by Google and is part of LLVM. It has been used to build many machine learning compilers such as IREE, OpenXLA and Torch-MLIR.

Unfortunately, MLIR has a steep learning curve. Here is a list of the resources that I have found helpful:

  • A good introduction to MLIR and how it can be used can be found in the “MLIR Tutorial” by Mehdi Amini & River Riddle link.

  • Another recommended introduction to MLIR was presented by Oleksandr “Alex” Zinenko in CGO Conference link.

  • I think Jeremy Kun’s “MLIR for Beginners” tutorial is the most accessible tutorial for beginners link.

  • The toy tutorial in the MLIR repo provides a nice end to end example in which the toy language is lowered all the way to LLVMIR and executed. It also shows all the different components inside the MLIR framework link.

  • Alex Zinenko provided an excellent analysis and breakdown of the different dialects in this write up link.

  • Mehdi Amini provided an insightful presentation about the internal implementation of the mlir operations and attributes in this MLIR Open Design Meeting slides recording.

  • Having a look at previous MLIR talks is also recommended link.

  • Lei Zhang’s blog on mlir / compiler development is also recommended after going through the previous resources link.

I hope that was helpful. I will keep updating this list with resources as I progress more in my journey.

Tags:

Date Posted: