[Mlir-commits] [mlir] 32a7d60 - [mli][linalg] Change tensor size in unit test (NFC).
Tobias Gysi
llvmlistbot at llvm.org
Sun Oct 3 23:44:42 PDT 2021
Author: Tobias Gysi
Date: 2021-10-04T06:43:35Z
New Revision: 32a7d6051633b699b41664c6722e1088ed34aa8f
URL: https://github.com/llvm/llvm-project/commit/32a7d6051633b699b41664c6722e1088ed34aa8f
DIFF: https://github.com/llvm/llvm-project/commit/32a7d6051633b699b41664c6722e1088ed34aa8f.diff
LOG: [mli][linalg] Change tensor size in unit test (NFC).
As a follow up to https://reviews.llvm.org/D110849, adapt the input tensor size to match the iteration space.
Reviewed By: antiagainst
Differential Revision: https://reviews.llvm.org/D110906
Added:
Modified:
mlir/test/Dialect/Linalg/tile-and-fuse-on-tensors.mlir
Removed:
################################################################################
diff --git a/mlir/test/Dialect/Linalg/tile-and-fuse-on-tensors.mlir b/mlir/test/Dialect/Linalg/tile-and-fuse-on-tensors.mlir
index f53e1708986fd..72c780a08c123 100644
--- a/mlir/test/Dialect/Linalg/tile-and-fuse-on-tensors.mlir
+++ b/mlir/test/Dialect/Linalg/tile-and-fuse-on-tensors.mlir
@@ -234,19 +234,25 @@ builtin.func @fuse_indexed(%arg0: tensor<24x12xi32>,
// CHECK-DAG: #[[MAP0:.*]] = affine_map<(d0, d1) -> (d0 + d1)>
// CHECK-DAG: #[[MAP1:.*]] = affine_map<(d0, d1) -> (8, -d0 - d1 + 17)>
-// CHECK-DAG: #[[MAP2:.*]] = affine_map<(d0, d1, d2) -> (d0, -d1 - d2 + 18)>
+// CHECK-DAG: #[[MAP2:.*]] = affine_map<(d0, d1, d2) -> (d0, -d1 - d2 + 17)>
#map0 = affine_map<(d0, d1) -> (d0, d0 + d1)>
#map1 = affine_map<(d0, d1) -> (d0, d1)>
// CHECK: fuse_non_rectangular
-// CHECK-SAME: %[[ARG0:[0-9a-zA-Z]*]]: tensor<10x18xf32>
-func @fuse_non_rectangular(%arg0: tensor<10x18xf32>,
+// CHECK-SAME: %[[ARG0:[0-9a-zA-Z]*]]: tensor<10x17xf32>
+func @fuse_non_rectangular(%arg0: tensor<10x17xf32>,
%arg1: tensor<10x8xf32>) -> tensor<10x8xf32> {
+
+ // CHECK-DAG: %[[C0:.*]] = constant 0 : index
+ // CHECK-DAG: %[[C4:.*]] = constant 4 : index
+ // CHECK-DAG: %[[C5:.*]] = constant 5 : index
+ // CHECK-DAG: %[[C8:.*]] = constant 8 : index
+ // CHECK-DAG: %[[C10:.*]] = constant 10 : index
%cst = constant 0.000000e+00 : f32
- %0 = linalg.fill(%cst, %arg0) : f32, tensor<10x18xf32> -> tensor<10x18xf32>
+ %0 = linalg.fill(%cst, %arg0) : f32, tensor<10x17xf32> -> tensor<10x17xf32>
- // CHECK: scf.for %[[IV0:[0-9a-zA-Z]*]] = %c0 to %c8 step %c4
- // CHECK: scf.for %[[IV1:[0-9a-zA-Z]*]] = %c0 to %c10 step %c5
+ // CHECK: scf.for %[[IV0:[0-9a-zA-Z]*]] = %[[C0]] to %[[C8]] step %[[C4]]
+ // CHECK: scf.for %[[IV1:[0-9a-zA-Z]*]] = %[[C0]] to %[[C10]] step %[[C5]]
// Compute producer on a hyper rectangular bounding box. Along the second dimenson,
// the offset is set to the sum of the induction variables, and the upper bound
@@ -259,7 +265,7 @@ func @fuse_non_rectangular(%arg0: tensor<10x18xf32>,
// CHECK-SAME: %[[IV1]], %[[SUM]]
// CHECK-SAME: , %[[UB1]]
// CHECK: %[[T1:.*]] = linalg.fill(%{{.*}}, %[[T0]])
- %1 = linalg.generic {indexing_maps = [#map0, #map1], iterator_types = ["parallel", "parallel"]} ins(%0 : tensor<10x18xf32>) outs(%arg1 : tensor<10x8xf32>) {
+ %1 = linalg.generic {indexing_maps = [#map0, #map1], iterator_types = ["parallel", "parallel"]} ins(%0 : tensor<10x17xf32>) outs(%arg1 : tensor<10x8xf32>) {
^bb0(%arg2: f32, %arg3: f32): // no predecessors
%2 = addf %arg2, %arg3 : f32
linalg.yield %2 : f32
More information about the Mlir-commits
mailing list