Skip to content

Commit cc10325

Browse files
committed
more IR tests
1 parent 33a7435 commit cc10325

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

mlir/test/Dialect/SCF/canonicalize.mlir

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1811,7 +1811,7 @@ module {
18111811
%4 = affine.min #map2(%arg3)[%dim, %arg0]
18121812
%extracted_slice0 = tensor.extract_slice %arg4[%3] [%4] [1] : tensor<?xf32> to tensor<?xf32>
18131813
%extracted_slice1 = tensor.extract_slice %arg5[%3] [%4] [1] : tensor<?xf32> to tensor<?xf32>
1814-
%5 = linalg.elemwise_unary ins(%extracted_slice0 : tensor<?xf32>) outs(%extracted_slice1 : tensor<?xf32>) -> tensor<?xf32>
1814+
%5 = linalg.exp ins(%extracted_slice0 : tensor<?xf32>) outs(%extracted_slice1 : tensor<?xf32>) -> tensor<?xf32>
18151815
scf.forall.in_parallel {
18161816
tensor.parallel_insert_slice %5 into %arg5[%3] [%4] [1] : tensor<?xf32> into tensor<?xf32>
18171817
}
@@ -1825,7 +1825,7 @@ module {
18251825
// CHECK-SAME: shared_outs(%[[ITER_ARG_5:.*]] = %[[ARG2]]) -> (tensor<?xf32>) {
18261826
// CHECK: %[[OPERAND0:.*]] = tensor.extract_slice %[[ARG1]]
18271827
// CHECK: %[[OPERAND1:.*]] = tensor.extract_slice %[[ITER_ARG_5]]
1828-
// CHECK: %[[ELEM:.*]] = linalg.elemwise_unary ins(%[[OPERAND0]] : tensor<?xf32>) outs(%[[OPERAND1]] : tensor<?xf32>) -> tensor<?xf32>
1828+
// CHECK: %[[ELEM:.*]] = linalg.exp ins(%[[OPERAND0]] : tensor<?xf32>) outs(%[[OPERAND1]] : tensor<?xf32>) -> tensor<?xf32>
18291829
// CHECK: scf.forall.in_parallel {
18301830
// CHECK-NEXT: tensor.parallel_insert_slice %[[ELEM]] into %[[ITER_ARG_5]]
18311831
// CHECK-NEXT: }
@@ -1851,7 +1851,7 @@ module {
18511851
%extracted_slice_0 = tensor.extract_slice %arg6[%3] [%4] [1] : tensor<?xf32> to tensor<?xf32>
18521852
%extracted_slice_1 = tensor.extract_slice %arg7[%3] [%4] [1] : tensor<?xf32> to tensor<?xf32>
18531853
%extracted_slice_2 = tensor.extract_slice %0[%3] [%4] [1] : tensor<?xf32> to tensor<?xf32>
1854-
%5 = linalg.elemwise_unary ins(%extracted_slice : tensor<?xf32>) outs(%extracted_slice_1 : tensor<?xf32>) -> tensor<?xf32>
1854+
%5 = linalg.exp ins(%extracted_slice : tensor<?xf32>) outs(%extracted_slice_1 : tensor<?xf32>) -> tensor<?xf32>
18551855
scf.forall.in_parallel {
18561856
tensor.parallel_insert_slice %5 into %arg6[%3] [%4] [1] : tensor<?xf32> into tensor<?xf32>
18571857
tensor.parallel_insert_slice %extracted_slice into %arg5[%3] [%4] [1] : tensor<?xf32> into tensor<?xf32>
@@ -1868,7 +1868,7 @@ module {
18681868
// CHECK-SAME: shared_outs(%[[ITER_ARG_6:.*]] = %[[ARG2]]) -> (tensor<?xf32>) {
18691869
// CHECK: %[[OPERAND0:.*]] = tensor.extract_slice %[[ARG1]]
18701870
// CHECK: %[[OPERAND1:.*]] = tensor.extract_slice %[[ARG3]]
1871-
// CHECK: %[[ELEM:.*]] = linalg.elemwise_unary ins(%[[OPERAND0]] : tensor<?xf32>) outs(%[[OPERAND1]] : tensor<?xf32>) -> tensor<?xf32>
1871+
// CHECK: %[[ELEM:.*]] = linalg.exp ins(%[[OPERAND0]] : tensor<?xf32>) outs(%[[OPERAND1]] : tensor<?xf32>) -> tensor<?xf32>
18721872
// CHECK: scf.forall.in_parallel {
18731873
// CHECK-NEXT: tensor.parallel_insert_slice %[[ELEM]] into %[[ITER_ARG_6]]
18741874
// CHECK-NEXT: }

mlir/test/Integration/Dialect/Transform/match_matmul.mlir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func.func @matmul_with_extra_ops_in_func(%lhs: tensor<10x20xf32>, %rhs: tensor<2
6969
// expected-remark @below {{fill}}
7070
%fill = linalg.fill ins(%cst : f64) outs(%empty : tensor<10x15xf32>) -> tensor<10x15xf32>
7171

72-
%real_lhs = linalg.elemwise_binary { fun = #linalg.binary_fn<mul> }
72+
%real_lhs = linalg.mul
7373
ins(%lhs, %lhs : tensor<10x20xf32>, tensor<10x20xf32>) outs(%lhs : tensor<10x20xf32>) -> tensor<10x20xf32>
7474

7575
// expected-remark @below {{matmul}}

mlir/test/Interfaces/TilingInterface/tile-and-fuse-consumer.mlir

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module {
1919
}
2020
%in_operand_2 = tensor.empty() : tensor<64xf32>
2121
%out_operand_3 = tensor.empty() : tensor<64xf32>
22-
%2 = linalg.elemwise_binary {fun = #linalg.binary_fn<add>} ins(%1#1, %in_operand_2 : tensor<64xf32>, tensor<64xf32>) outs(%out_operand_3 : tensor<64xf32>) -> tensor<64xf32>
22+
%2 = linalg.add ins(%1#1, %in_operand_2 : tensor<64xf32>, tensor<64xf32>) outs(%out_operand_3 : tensor<64xf32>) -> tensor<64xf32>
2323
return %2 : tensor<64xf32>
2424
}
2525
}
@@ -50,7 +50,7 @@ module attributes {transform.with_named_sequence} {
5050
// CHECK: %[[INSERT_MAT:.*]] = tensor.insert_slice %[[MAT_OUT]] into %[[FIRST_OUT_ARG]][%[[IV]]] [32] [1]
5151
// CHECK: %[[SLICE_OPERAND2:.*]] = tensor.extract_slice %0[%[[IV]]] [32] [1]
5252
// CHECK: %[[SLICE_OUT:.*]] = tensor.extract_slice %[[ELEM_OUT_ARG]][%[[IV]]] [32] [1]
53-
// CHECK: %[[ELEM_OUT:.*]] = linalg.elemwise_binary {fun = #linalg.binary_fn<add>}
53+
// CHECK: %[[ELEM_OUT:.*]] = linalg.add
5454
// CHECK-SAME: ins(%[[MAT_OUT]], %[[SLICE_OPERAND2]] :
5555
// CHECK-SAME: outs(%[[SLICE_OUT]] :
5656
// CHECK: %[[INSERT_ELEM:.*]] = tensor.insert_slice %[[ELEM_OUT]] into %[[ELEM_OUT_ARG]][%[[IV]]] [32] [1]
@@ -76,7 +76,7 @@ module {
7676
}
7777
%in_operand_2 = tensor.empty() : tensor<64x64xf32>
7878
%out_operand_3 = tensor.empty() : tensor<64x64xf32>
79-
%2 = linalg.elemwise_binary {fun = #linalg.binary_fn<add>} ins(%1#1, %in_operand_2 : tensor<64x64xf32>, tensor<64x64xf32>) outs(%out_operand_3 : tensor<64x64xf32>) -> tensor<64x64xf32>
79+
%2 = linalg.add ins(%1#1, %in_operand_2 : tensor<64x64xf32>, tensor<64x64xf32>) outs(%out_operand_3 : tensor<64x64xf32>) -> tensor<64x64xf32>
8080
return %2 : tensor<64x64xf32>
8181
}
8282
}
@@ -109,7 +109,7 @@ module attributes {transform.with_named_sequence} {
109109
// CHECK-SAME: outs(%[[MAT_OUT_SLICE]] :
110110
// CHECK: %[[SLICE_OPERAND2:.*]] = tensor.extract_slice %[[OUT_INIT]][%[[IV1]], %[[IV2]]] [32, 32] [1, 1]
111111
// CHECK: %[[SLICE_OUT:.*]] = tensor.extract_slice %[[ELEM_OUT_ARG]][%[[IV1]], %[[IV2]]] [32, 32] [1, 1]
112-
// CHECK: %[[ELEM_OUT:.*]] = linalg.elemwise_binary {fun = #linalg.binary_fn<add>}
112+
// CHECK: %[[ELEM_OUT:.*]] = linalg.add
113113
// CHECK-SAME: ins(%[[MAT_OUT]], %[[SLICE_OPERAND2]] :
114114
// CHECK-SAME: outs(%[[SLICE_OUT]] :
115115
// CHECK: scf.forall.in_parallel {

0 commit comments

Comments
 (0)