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

Christopher McGirr llvmlistbot at llvm.org
Fri Jun 27 00:16:08 PDT 2025


================
@@ -262,21 +270,50 @@ def Linalg_UnPackOp : Linalg_RelayoutOp<"unpack"> {
       `inner_dims_pos[i]` (assuming that `outer_dims_perm` is not specified)
       evenly.
 
+    `inner_dims_pos` (mandatory) specifies `k` result tensor (i.e. unpacked
+    tensor) dimensions that were tiled with the `inner_tiles` to create the
+    packed source tensor. The source tensor (i.e. packed tensor) dimensions can
+    be unpacked given `inner_dims_pos` as follows.
+    - For `0 <= i < k` the following relationship holds:
+    `shape(result)[inner_dims_pos[i]] = shape(source)[n-k+i] + shape(source)[inner_dims_pos[i]]`.
----------------
chrsmcgrr wrote:

Totally right it should be `*` and I did forget about the padding case. The new equality would hold now. 

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


More information about the Mlir-commits mailing list