guraypp
guraypp
MModular
Created by guraypp on 10/19/2023 in #questions
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)
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
$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
4 replies