How to build the MLIR documentation locally

This is probably a stupid question, but how do I actually build the documentation for MLIR locally? I have generated the build system with LLVM_ENABLE_DOXYGEN=ON:

cmake -G Ninja llvm \

And then build something from MLIR in the hope that documentation would be generated:

cmake --build . --target mlir-opt

However, I can’t find any output files. Anyone here who knows how to do it?

1 Like
> ninja -t targets | grep doc

tells me that there is a

> mlir-doc
./mlir-opt -help
OVERVIEW: MLIR modular optimizer driver

That tool is something else.

1 Like

mlir-doc will generate markdown from the dialect definitions in TableGen. There is also a mlir-doxygen target.

The “recipe” to build the website is here mlir-www/main.yml at main · llvm/mlir-www · GitHub

1 Like

Thanks both!