M
Modular12mo ago
jmky

A Guide on the Translation from MLIR Syntax to Mojo Syntax

The Mojo documentation states that all MLIR operations and types can be interfaced through Mojo. However, is there a guide to translate the syntaxes of MLIR dialects into Mojo syntaxes so that engineers can take more direct control on how to use MLIR operations within Mojo?
6 Replies
jakobpraher
jakobpraher12mo ago
This is interesting to me as well. Is there also some documentation (planned) about the MLIR designs w.r.t Mojo and how it fits into the whole MLIR pipeline.
ossfellow
ossfellow12mo ago
@jmky, if you check the ray tracing notebook, you can see how MLIR can be used within your Mojo code: https://docs.modular.com/mojo/notebooks/RayTracing.html
Modular Docs - Ray tracing in Mojo
Learn how to draw 3D graphics with ray-traced lighting using Mojo.
Robert
Robert12mo ago
Another piece that would be nice to know is when and how will we be able to pull in a user custom MLIR dialect into the mojo complier (and the IR lowering stack). I would be interested in seeing how one could have Mojo act as a EDSL for a couple of the CIRCT LLVM MLIR dialects.
iddu
iddu12mo ago
They recommend against using their undocumented dialects, and the roadmap is a bit vague about adding arbitrary dialects. I'm curious to know more about it.
Robert
Robert12mo ago
The Mojo compiler dialects are likely to evolve quickly as they continue to develop the Mojo programming language. I want to play with dialects that use Mojo like an EDSL engine. Getting the compile time support during lowering w/o having the final steps of lowering being the LLVM IR.
iddu
iddu12mo ago
Same. I'm curious what the timeline for that might be.
Want results from more Discord servers?
Add your server