Mehdi AMINI via llvm-dev
2019-Sep-10 22:51 UTC
[llvm-dev] Google’s TensorFlow team would like to contribute MLIR to the LLVM Foundation
On Tue, Sep 10, 2019 at 1:40 PM David Greene via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Renato Golin via llvm-dev <llvm-dev at lists.llvm.org> writes: > > > But perhaps more importantly, as Hal states clearly, is the need for > > an official specification, similar to the one for LLVM IR, as well as > > a formal document with the expected semantics into LLVM IR. Sooner, > > indeed. > > +1. There are all kinds of scattered documents on the TensorFlow site > talking about MLIR, the affine dialect, etc. but nothing of the quality > and approachability of LLVM's language reference. I find it difficult > to pull all the pieces together. >One of the main reason we haven't invested in a proper website and documentation was in anticipation of a possible integration in LLVM, so we didn't prioritize what I saw as throw-away work. We're looking forward to have a space on llvm.org for MLIR and build great online docs there! Of course by its nature, MLIR doesn't lend itself to concrete semantic> descriptions, though I would expect the affine dialect (and others) to > have documentation on par with the LLVM IR.Just last week I had to scout through the affine dialect "LangRef <https://github.com/tensorflow/mlir/blob/master/g3doc/Dialects/Affine.md>" for something, and I also felt that it is due for a refresh! It seemed a bit more than just BNF though, do you have example of what you would like to see expanded there? And to be clear: the ambition should be that the dialects included in-tree (in MLIR/LLVM) get some level of documentation on-par with LLVM LangRef.> For MLIR itself, I would > want documentation somewhat less dense than the current BNF-style > specification. > > Does the current proposal only cover adding the base MLIR to the LLVM > project, or also the affine dialect and possibly others? The affine > dialect could certainly be quite useful for many projects. >The current proposal includes all the content of https://github.com/tensorflow/mlir/ as-is. It does *not* include the TensorFlow specific dialects and other pieces here: https://github.com/tensorflow/tensorflow/tree/master/tensorflow/compiler/mlir/ Best, -- Mehdi -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190910/b6e09024/attachment-0001.html>
David Greene via llvm-dev
2019-Sep-11 20:53 UTC
[llvm-dev] Google’s TensorFlow team would like to contribute MLIR to the LLVM Foundation
Mehdi AMINI <joker.eph at gmail.com> writes:> Of course by its nature, MLIR doesn't lend itself to concrete semantic >> descriptions, though I would expect the affine dialect (and others) to >> have documentation on par with the LLVM IR. > > > Just last week I had to scout through the affine dialect "LangRef > <https://github.com/tensorflow/mlir/blob/master/g3doc/Dialects/Affine.md>" > for something, and I also felt that it is due for a refresh! It seemed a > bit more than just BNF though, do you have example of what you would like > to see expanded there?I was referring to the base MLIR documentation with the BNF comment: https://github.com/tensorflow/mlir/blob/master/g3doc/LangRef.md Obviously there's more to it than that but I found this document pretty dense.> The current proposal includes all the content of > https://github.com/tensorflow/mlir/ as-is. > It does *not* include the TensorFlow specific dialects and other pieces > here: > https://github.com/tensorflow/tensorflow/tree/master/tensorflow/compiler/mlir/Looks great, thanks for making it more clear! -David
Mehdi Amini via llvm-dev
2019-Sep-11 22:04 UTC
[llvm-dev] Google’s TensorFlow team would like to contribute MLIR to the LLVM Foundation
On Wed, Sep 11, 2019 at 1:54 PM David Greene <greened at obbligato.org> wrote:> Mehdi AMINI <joker.eph at gmail.com> writes: > > > Of course by its nature, MLIR doesn't lend itself to concrete semantic > >> descriptions, though I would expect the affine dialect (and others) to > >> have documentation on par with the LLVM IR. > > > > > > Just last week I had to scout through the affine dialect "LangRef > > <https://github.com/tensorflow/mlir/blob/master/g3doc/Dialects/Affine.md > >" > > for something, and I also felt that it is due for a refresh! It seemed a > > bit more than just BNF though, do you have example of what you would like > > to see expanded there? > > I was referring to the base MLIR documentation with the BNF comment: > > https://github.com/tensorflow/mlir/blob/master/g3doc/LangRef.md > > Obviously there's more to it than that but I found this document pretty > dense. >Oh I see, indeed this is a bit difficult to grasp: since MLIR is designed for extensibility, a lot of the core "LangRef" things are very structural by nature at this level. If I draw a parallel with LLVM IR, it is like if you would split LangRef into: - the definition of what is SSA, Module, Function, Block, terminator, phi nodes. In particular that would be most of: Abstract <https://llvm.org/docs/LangRef.html#abstract>, Introduction <https://llvm.org/docs/LangRef.html#introduction>, Well-Formedness <https://llvm.org/docs/LangRef.html#well-formedness>, Identifiers <https://llvm.org/docs/LangRef.html#identifiers>, High Level Structure <https://llvm.org/docs/LangRef.html#high-level-structure>, Module Structure <https://llvm.org/docs/LangRef.html#module-structure>, and partially Functions <https://llvm.org/docs/LangRef.html#functions> (which defines CFG). - the types and instructions semantics (all the rest of LangRef basically). The MLIR LangRef corresponds to the former part only, because this is what is common to all dialects. On the other hand, each dialect will need to provide its own LangRef equivalent (for example I linked to the Affine dialect doc before). Does it make sense? -- Mehdi> > The current proposal includes all the content of > > https://github.com/tensorflow/mlir/ as-is. > > It does *not* include the TensorFlow specific dialects and other pieces > > here: > > > https://github.com/tensorflow/tensorflow/tree/master/tensorflow/compiler/mlir/ > > Looks great, thanks for making it more clear! > > -David >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190911/33740800/attachment.html>
Apparently Analagous Threads
- Google’s TensorFlow team would like to contribute MLIR to the LLVM Foundation
- Google’s TensorFlow team would like to contribute MLIR to the LLVM Foundation
- Google’s TensorFlow team would like to contribute MLIR to the LLVM Foundation
- Google’s TensorFlow team would like to contribute MLIR to the LLVM Foundation
- MLIR landing in the monorepo