2 ms·
I've read from previous descriptions of MLIR that "dialects" could be reused in new compiler projects, such as embedding XLA in a non-TensorFlow product. This p
by chrisaycock 7y ago
I've read from previous descriptions of MLIR that "dialects" could be reused in new compiler projects, such as embedding XLA in a non-TensorFlow product. This paper mentions a new example I had not considered: language-independent OpenMP.
In other words, an MLIR dialect of OpenMP could be reused in both Fortran and C. But it can also be used in a brand new programming language that just wants to enable multiprocessing. With OpenACC extensions, targeting GPUs would be nearly automatic for a new language!
One question I've had, and which the paper does acknowledge, is the AST. The paper states that MLIR does not currently target syntax and recommends ANTLR instead. The AST is still a manual process (my own language uses a port of CPython's ASDL).
- Joky 7y agoI wouldn't say that we "recommend" ANTLR, but yes it is likely "possible" to represent some AST in MLIR, but we just aren't convinced that MLIR is the best tool there so far.