Replies: 2 comments 4 replies
-
Indeed, the MLIR integration hasn't been polished or designed to be pretty - we've focused primarily on making it fully capable and unblocking our needs. The idea for it is that only MLIR experts would be using this, but then they'd be wrapping user-facing Pythonic types and methods around them (e.g. like OurBool wraps i1). that said, we can definitely improve this in various ways, we just can't do so at the loss of fidelity/expressiveness. |
Beta Was this translation helpful? Give feedback.
-
This is also something we're likely to look into in the far future, but isn't a priority right now. Also, as mojo opens up more, it would be great for community members to poke at this. |
Beta Was this translation helpful? Give feedback.
-
Thanks the Mojo team for this great new language. It's really amazing!
Reading the documents on MLIR related APIs, I feel that the style of these APIs seems to be quite different with Python. For example, in the following official example, syntaxes like
Self {}
,`index.bool.constant`
and[value : --mlir_attr.`false`,]()
can rarely be seen in Python code.So, I wander, can the API be more Pythonic? Like:
Also, the doc mentioned that in the future, Mojo will support more dialects from MLIR. I wander if it is possible to make Mojo more extensible such that it can also create new didacts?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions