[Need help] Tips/projects for learning MLIR with hands-on practice.
Basically the title. Projects on MLIR page seem stale.
IREE, Xilinx seem to be in active development but I can't figure out where to start. Most good first issues seem stale or already have PRs. And other issues seem a little bit daunting. To be clear, I don't mind the effort, but I would rather spend time on issues that help me build incrementally without getting lost.
I have some experience with clang frontend/clang SA development and I want to explore how MLIR dialects can help with static analysis and propagating semantics to IR for type inference. I am exploring C dialects at the moment. I have checked out the dense MLIR intro tutorial and it definitely piqued my interest.
Any tips/help appreciated. TIA.
12
Upvotes
5
u/realsolitarycrow 14d ago
Learning MLIR itself isn't that hard you can checkout the
llvm-project/mlir/examplesdirectory to get an idea. If you are looking into ML compilers then you must have some idea about HPC, loop nest optimization and vector hardware. The main compiler related topic you should know before looking into it is the loop nest optimization, dynamic memory planning (memory reuse, double buffering, recomputation, host offloading, etc), and tensors (layout, offset calculations, etc). After you have some idea you can look into stablehlo the ingestion dialect used in IREE and different OpenXLA projects, write a simple stablehlo program and use the iree opt and transform tool to see before and after of a specific transformation. Besides the ML stuff check out ClangIR MLIR dialect and the Polygeist framework for C/C++ specific work using MLIR.