ModularM
Modular3y ago
3 replies
guraypp

Is it possible to use MLIR dialects?

Hi, I am trying to use MLIR dialects in mojo (other than index), I get unregistered dialect error. Is it possible to register other dialects?

Also, is it possible to see generated MLIR?

def main():
    let d = __mlir_attr.`true`
    __mlir_op.`vector.print`[_type=__mlir_type.index](d)

error
$mojo guray.mojo
asd.mojo:22:54: error: use of unregistered MLIR operation 'vector.print'
    __mlir_op.`vector.print`[_type=__mlir_type.index](d)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
mojo: error: failed to parse the provided Mojo
Was this page helpful?