Skip to content

Commit e273ea6

Browse files
committed
Update tests
1 parent 0c37ff2 commit e273ea6

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

mlir/test/Dialect/Linalg/tile-tensors.mlir

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,14 @@ func.func @non_monotonic_affine_expr(%arg0 : tensor<7xf32>) -> tensor<7xf32> {
177177
%0 = tensor.dim %arg0, %c0 : tensor<7xf32>
178178
%empty = tensor.empty() : tensor<7xf32>
179179

180-
// CHECK: %[[OUT:.*]] = tensor.empty() : tensor<7xf32>
181-
// CHECK: scf.for {{.*}} to {{.*}} step {{.*}} iter_args(%[[TC0:.*]] = %[[OUT]]) -> (tensor<7xf32>) {
182-
// CHECK: tensor.extract_slice %[[TC0]][0] [7] [1] : tensor<7xf32> to tensor<7xf32>
180+
// CHECK-DAG: %[[C0:.*]] = arith.constant 0 : index
181+
// CHECK-DAG: %[[OUT:.*]] = tensor.empty() : tensor<7xf32>
182+
// CHECK-DAG: %[[C0:.*]] = arith.constant 0 : index
183+
// CHECK-DAG: %[[C7:.*]] = arith.constant 7 : index
184+
// CHECK-DAG: %[[C7_1:.*]] = arith.constant 7 : index
185+
// CHECK: scf.for %[[IV0:.+]] = %[[C0]] to %[[C7]] step %[[C7_1]] iter_args(%[[TC0:.*]] = %[[OUT]]) -> (tensor<7xf32>) {
186+
// CHECK: tensor.extract_slice %[[ARG0]][0] [7] [1] : tensor<7xf32> to tensor<7xf32>
187+
// CHECK: tensor.extract_slice %[[TC0]][%[[IV0]]] [7] [1] : tensor<7xf32> to tensor<7xf32>
183188
%generic = linalg.generic
184189
{indexing_maps = [affine_map<(d0) -> (d0 mod 4)>,
185190
affine_map<(d0) -> (d0)>],
@@ -220,7 +225,7 @@ func.func @tile_monotonic_outer_dim(%in: tensor<4x10xf32>) -> tensor<4x10xf32> {
220225
// CHECK: %[[C5:.+]] = arith.constant 5 : index
221226
// CHECK: scf.for %[[IV0:.+]] = %{{.+}} to %[[C4]] step %[[C4_1]] iter_args(%[[ARG1:.+]] = %[[OUT:.+]]) -> (tensor<4x10xf32>) {
222227
// CHECK: scf.for %[[IV1:.+]] = %{{.+}} to %{{.+}} step %[[C5]] iter_args(%[[ARG2:.+]] = %[[ARG1]]) -> (tensor<4x10xf32>) {
223-
// CHECK: %[[INSLICE:.+]] = tensor.extract_slice %[[ARG0]][0, %[[IV1]]] [4, 5] [1, 1] : tensor<4x10xf32> to tensor<4x5xf32>
228+
// CHECK: %[[INSLICE:.+]] = tensor.extract_slice %[[ARG0]][%[[IV0]], %[[IV1]]] [4, 5] [1, 1] : tensor<4x10xf32> to tensor<4x5xf32>
224229
// CHECK: %[[OUTSLICE:.+]] = tensor.extract_slice %[[ARG2]][0, %[[IV1]]] [4, 5] [1, 1] : tensor<4x10xf32> to tensor<4x5xf32>
225230
// CHECK: %[[RES:.+]] = linalg.generic {indexing_maps = [#map, #map1], iterator_types = ["parallel", "parallel"]} ins(%[[INSLICE]] : tensor<4x5xf32>) outs(%[[OUTSLICE]] : tensor<4x5xf32>) {
226231
// CHECK: ^bb0(%in: f32, %out: f32):

0 commit comments

Comments
 (0)