[Mlir-commits] [mlir] [mlir][linalg] Update pack and unpack documentation (PR #143903)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Thu Jun 12 14:41:02 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`.
- `inner_dims_pos[i]` specifies the source tensor dimension tiled by
- `inner_tiles[i]`.
+ `inner_tiles[i]` where `0 <= i < k`.
+ - the resulting tiled source dimension maps to an outer dimension of the
----------------
banach-space wrote:
1. Since this is a sentence (full stop at the end), start with a capital letter.
2. Introduce `inner_tiles` before this bullet point. Otherwise, this is referring to a concept yet to be introduced.
3. This sentence is a bit complex to parse. I have no good suggestion how to improve it - the underlying logic is just very tricky. In cases like this, Maths/code/diagrams are better than words. I would remove text and use code instead: `shape(result)[inner_dims_pos[i]] = shape(source)[inner_dims_pos[i]] / inner_tiles[i]`. You could add: "The following relationship for the tiled dimensions holds: ...".
https://github.com/llvm/llvm-project/pull/143903
More information about the Mlir-commits
mailing list