Search code examples
llvm-irllvm-c++-api

How I can learn mlir?


Hi I just came from milr doc and got quiet confused.

I tried to work through the toy project, but cannot understand the mechanism and concept of dialect.

The tutorial just offered an example of some code, how they would interact with each other, how should I use them, it mentioned nothing.

As a beginner, I'm really lost and do not know what to do.

May someone please help me on how to compile a simple program that transfer source to mlir, using the current framework it provided.


Solution

  • The easiest way to learn is by doing some projects. For MLIR, I think you can start by first understanding and doing the Toy tutorial

    Then see if you can extend it by adding a new operation to this toy language. If you found this interesting, try out a dialect conversion exercise (say toy to SCF).