[Mlir-commits] [mlir] [mlir][linalg] Update pack and unpack documentation (PR #143903)
Han-Chung Wang
llvmlistbot at llvm.org
Wed Jun 18 14:12:22 PDT 2025
================
@@ -94,11 +94,13 @@ def Linalg_PackOp : Linalg_RelayoutOp<"pack", [
and optionally transposes the tiled source tensor dimensions.
`inner_dims_pos` (mandatory) specifies `k` source tensor dimensions that are
- being tiled, where `0 < k <= n`. The order of the dimensions matters:
- - The tiled dimensions (of size `inner_tiles`) are added to the end of the result
- tensor in the order in which they appear in `inner_dims_pos`.
+ being tiled, where `0 < k <= n`.
----------------
hanhanW wrote:
I just found that k can equal to zero, which is a transpose op, Can you update the doc since you're touching the doc?
```
func.func @foo(%src: tensor<1x2x3xf32>, %dest: tensor<3x2x1xf32>) -> tensor<3x2x1xf32> {
%0 = linalg.pack %src outer_dims_perm = [2, 1, 0] inner_dims_pos = [] inner_tiles = [] into %dest : tensor<1x2x3xf32> -> tensor<3x2x1xf32>
return %0 : tensor<3x2x1xf32>
}
```
https://github.com/llvm/llvm-project/pull/143903
More information about the Mlir-commits
mailing list