Code Snippets MLIR

Short texts MLIR 🧑‍💻 Code snippets MLIR ✍️ Reading lists MLIR 👀

returnprog.mlir

module @module { iree_pydm.func @return_arg(%arg0: !iree_pydm.integer, %arg1: !iree_pydm.integer, %arg2: !iree_pydm.integer) -> (!iree_pydm.exception_result, !iree_pydm.integer) attributes {arg_names = [“a”, “b”, “c”], cell_vars = [], free_vars = [“a”, “b”, “c”]} { %a = alloc_free_var “a” -> !iree_pydm.free_var_ref %c = alloc_free_var “c” -> !iree_pydm.free_var_ref %b = alloc_free_var “b” -> !iree_pydm.free_var_ref %0 = box %arg0 : !iree_pydm.integer -> !iree_pydm.object store_var […]

Before iree-convert-to-nvvm pass (with batch size unknown)

module { memref.global “private” constant @__constant_64xf32_2 : memref = dense loc(unknown) memref.global “private” constant @__constant_64xf32_1 : memref = dense loc(unknown) memref.global “private” constant @__constant_64xf32_0 : memref = dense loc(unknown) memref.global “private” constant @__constant_64xf32 : memref = dense loc(unknown) func @_forward_dispatch_3() { %c-1 = constant -1 : index loc(unknown) %c32 = constant 32 : index loc(unknown) […]

return_arg.mlir

module @module attributes {hal.device.targets = [#device_target_cpu]} { vm.module public @module attributes {ordinal_counts = #vm.ordinal_counts} { vm.func private @return_arg(%arg0: i32) -> (i32, i32) attributes {ordinal = 0 : i32} { %zero = vm.const.i32.zero : i32 %c2 = vm.const.i32 2 : i32 %c9 = vm.const.i32 9 : i32 %c1 = vm.const.i32 1 : i32 %c256 = vm.const.i32 […]

foo.mlir

#map0 = affine_map (d0, d1)> #map1 = affine_map (d1, d2)> #map2 = affine_map (d0, d2)> #map3 = affine_map (d0, d1)> module { func private @actual(%arg0: tensor

pydm_rtl.mlir

module { module @booleans { iree_pydm.func @pydmrtl$object_as_bool(%arg0: !iree_pydm.object) -> (!iree_pydm.exception_result, !iree_pydm.bool) attributes {arg_names = [“v”], cell_vars = [], free_vars = [“v”]} { %0 = constant 8 : i64 -> !iree_pydm.integer %1 = constant 1 : i64 -> !iree_pydm.integer %2 = constant false -> !iree_pydm.bool %3 = constant 9 : i64 -> !iree_pydm.integer %4 = constant […]