Skip to content

Commit b7d3d99

Browse files
committed
fixup! [mlir][tensor] Update GeneralizeOuterUnitDimsPackOpPattern
final tweaks
1 parent adc0fc7 commit b7d3d99

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1183,7 +1183,8 @@ LogicalResult GeneralizeOuterUnitDimsPackOpPattern::matchAndRewrite(
11831183

11841184
// 2. Transpose the input to match the inner tile order:
11851185
// %init = tensor.empty()
1186-
// %transposed_tile = linalg.transpose ins(%extracted_tile), outs(%init)
1186+
// %transposed_tile = linalg.transpose ins(%source_or_padded_source),
1187+
// outs(%init)
11871188
// Two assumptions are made:
11881189
// 1. All outer dims are 1 - the corresponding transposition doesn't matter.
11891190
// 2. Inner dims position correspond to the trailing `numTiles` dims.

mlir/test/Dialect/Linalg/generalize-tensor-pack-tile.mlir

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ func.func @KCRS_to_KCRSsr(%arg0: tensor<1x1x128x64xf32>, %arg1: tensor<1x1x4x8x8
1515
// CHECK: %[[IN_S:.+]] = affine.apply #[[MAP2]](%[[S]])
1616
// CHECK: %[[SRC_SLICE:.+]] = tensor.extract_slice %[[SRC]]
1717
// CHECK-SAME: [0, 0, %[[IN_R]], %[[IN_S]]] [1, 1, 32, 8] [1, 1, 1, 1]
18-
// CHECK: %[[TILE:.*]] = tensor.extract_slice %[[ITER_SLICE]]
19-
// CHECK-SAME: [0, 0, %[[R]], %[[S]], 0, 0] [1, 1, 1, 1, 8, 32] [1, 1, 1, 1, 1, 1] : tensor<1x1x4x8x8x32xf32> to tensor<1x1x1x1x8x32xf32>
2018
// CHECK: %[[EMPTY:.*]] = tensor.empty() : tensor<1x1x8x32xf32>
2119
// CHECK: %[[TRANSP:.*]] = linalg.transpose
2220
// CHECK-SAME: ins(%[[SRC_SLICE]] : tensor<1x1x32x8xf32>)

0 commit comments

Comments
 (0)