[llvm-dev] Google’s TensorFlow team would like to contribute MLIR to the LLVM Foundation

David Greene via llvm-dev llvm-dev at lists.llvm.org
Mon Sep 16 09:57:54 PDT 2019


Mehdi AMINI <joker.eph at gmail.com> writes:

> Another things that I just remember now about documentation is that we
> don't expect dialects to write a "LangRef" that describe each
> operation.  Instead we use a table-driven approach for defining
> operation
> <https://github.com/tensorflow/mlir/blob/master/g3doc/OpDefinitions.md#table-driven-operation-definition-specification-ods>
> and we generate both the C++ classes and the documentation from there
> (this helps keeping documentation up-to-date as well!).
>
> From a local build directory of MLIR, you can try:
>
>   {BUILD}/bin/mlir-tblgen -gen-op-doc {SRC}/Dialect/StandardOps/Ops.td -I
> {SRC}/include/ > std.md
>
> (try --gen-op-defs and --gen-op-decls for the C++ code)
>
> I pushed these here for your convenience:
> https://github.com/joker-eph/mlir-docs/

Very nice!

> Of course we need to improve the content in general, but I expect the
> incentive to do so to grow assuming we can get a space like
> http://llvm.org/mlir ; at which point we could organize the MLIR overall
> online doc structure to include these generated file continuously.

That would be wonderful.  Thanks for engaging on this!

                   -David


More information about the llvm-dev mailing list