Skip to content

Commit 64f040b

Browse files
[mlir][linalg] Simplify runtime op verification test case (#141454)
Simplify one of the test cases to make it easier to understand what is being verified.
1 parent 9909cf5 commit 64f040b

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

mlir/test/Integration/Dialect/Linalg/CPU/runtime-verification.mlir

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,12 @@ func.func @main() {
109109
#identity1D = affine_map<(d0) -> (d0)>
110110

111111
func.func @simple_add(%arg0: tensor<?xf32>, %arg1: tensor<?xf32>) -> (tensor<?xf32>) {
112-
%c0 = arith.constant 0 : index
113-
%dim = tensor.dim %arg0, %c0 : tensor<?xf32>
114-
%result = tensor.empty(%dim) : tensor<?xf32>
115112
%0 = linalg.generic {
116-
indexing_maps = [#identity1D, #identity1D, #identity1D],
113+
indexing_maps = [#identity1D, #identity1D],
117114
iterator_types = ["parallel"]
118-
} ins(%arg0, %arg1 : tensor<?xf32>, tensor<?xf32>)
119-
outs(%result : tensor<?xf32>) {
120-
^bb0(%gen_arg1: f32, %gen_arg2: f32, %out: f32) :
115+
} ins(%arg0 : tensor<?xf32>)
116+
outs(%arg1 : tensor<?xf32>) {
117+
^bb0(%gen_arg1: f32, %gen_arg2: f32) :
121118
%tmp1 = arith.addf %gen_arg1, %gen_arg2 : f32
122119
linalg.yield %tmp1 : f32
123120
} -> tensor<?xf32>

0 commit comments

Comments
 (0)