Skip to content

Commit b008f63

Browse files
committed
[MLIR][Tensor] Fix example for pack/unpack (NFC)
1 parent 3c5e0d8 commit b008f63

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

mlir/include/mlir/Dialect/Tensor/IR/TensorOps.td

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1729,13 +1729,13 @@ def Tensor_PackOp : Tensor_RelayoutOp<"pack", [
17291729
Example NC_to_NCnc:
17301730

17311731
```mlir
1732-
tensor.pack %source inner_dims_pos = [0, 1]
1732+
%0 = tensor.pack %source inner_dims_pos = [0, 1]
17331733
inner_tiles = [8, 32] into %dest : tensor<128x256xf32> -> tensor<16x8x8x32xf32>
17341734
```
17351735
Example CK to KCck
17361736

17371737
```mlir
1738-
tensor.pack %source outer_dims_perm = [1, 0] inner_dims_pos = [0, 1]
1738+
%0 = tensor.pack %source outer_dims_perm = [1, 0] inner_dims_pos = [0, 1]
17391739
inner_tiles = [8, 32] into %dest : tensor<128x256xf32> -> tensor<8x16x8x32xf32>
17401740
```
17411741

@@ -1747,7 +1747,7 @@ def Tensor_PackOp : Tensor_RelayoutOp<"pack", [
17471747
Example NC_to_NCnc with padding:
17481748

17491749
```mlir
1750-
tensor.pack %arg padding_value(%pad : f32) inner_dims_pos = [0, 1]
1750+
%0 = tensor.pack %arg padding_value(%pad : f32) inner_dims_pos = [0, 1]
17511751
inner_tiles = [8, 2] into %arg1 : tensor<13x15xf32> -> tensor<2x8x8x2xf32>
17521752
```
17531753

@@ -1809,14 +1809,14 @@ def Tensor_UnPackOp : Tensor_RelayoutOp<"unpack"> {
18091809
Example NCnc_to_NC:
18101810

18111811
```mlir
1812-
tensor.unpack %source inner_dims_pos = [0, 1]
1812+
%0 = tensor.unpack %source inner_dims_pos = [0, 1]
18131813
inner_tiles = [8, 32] into %dest : tensor<16x8x8x32xf32> -> tensor<128x256xf32>
18141814
```
18151815

18161816
Example CK to KCck:
18171817

18181818
```mlir
1819-
tensor.unapck %source outer_dims_perm = [1, 0] inner_dims_pos = [0, 1]
1819+
%0 = tensor.unapck %source outer_dims_perm = [1, 0] inner_dims_pos = [0, 1]
18201820
inner_tiles = [8, 32] into %dest : tensor<8x16x8x32xf32> -> tensor<128x256xf32>
18211821
```
18221822
}];

0 commit comments

Comments
 (0)