[Mlir-commits] [mlir] [mlir][linalg] Update pack and unpack documentation (PR #143903)

Andrzej WarzyƄski llvmlistbot at llvm.org
Thu Jun 26 09:59:36 PDT 2025


================
@@ -1824,6 +1824,17 @@ func.func @unpack_invalid_outer_dims_perm(%source: tensor<128x256xf32>, %dest: t
 
 // -----
 
+// Here we have the source tensor being tiled as: `source[1] / 32` and `source[0] / 16` but the inner_dims_pos does not imply
+// a transpose of the outer dimensions for the result tensor. The tiled dimensions appear in the result tensor in the order
+// they appear in the source tensor, i.e. 16x4x32x16
----------------
banach-space wrote:

> I can remove the example if you like.

I do like this example, so lets keep it. My comment was more along the lines of: "Perhaps this long description could be trimmed to sth shorter referring to missing `outer_dims_perm`"? Here's a specific suggestion:
```mlir
The outer dims in the output tensor are incorrectly/unexpectedly transposed. This could be fixed by adding `outer_dims_perm = [1, 0]` (the default value assumes no transpose).
```

https://github.com/llvm/llvm-project/pull/143903


More information about the Mlir-commits mailing list