Skip to content

Commit aa5b3e1

Browse files
committed
review comment address
1 parent de9c5ce commit aa5b3e1

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

mlir/test/Dialect/Linalg/elementwise/named-to-elementwise.mlir

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ func.func @add(%A : tensor<16x8xf32>, %B: tensor<16x8xf32>, %C : tensor<16x8xf32
2626

2727
// ----
2828

29-
// CHECK: @sub(%[[A:.+]]: memref<16x8xf32>, %[[B:.+]]: memref<16x8xf32>, %[[C:.+]]: memref<16x8xf32>) {
30-
// CHECK: linalg.elementwise
29+
// CHECK: @sub(%[[A:.+]]: tensor<16x8xf32>, %[[B:.+]]: tensor<16x8xf32>, %[[C:.+]]: tensor<16x8xf32>) -> tensor<16x8xf32> {
30+
// CHECK: {{.*}} = linalg.elementwise
3131
// CHECK-SAME: kind=#linalg.elementwise_kind<sub>
32-
// CHECK-SAME: ins(%[[A]], %[[B]] : memref<16x8xf32>, memref<16x8xf32>)
33-
// CHECK-SAME: outs(%[[C]] : memref<16x8xf32>)
32+
// CHECK-SAME: ins(%[[A]], %[[B]] : tensor<16x8xf32>, tensor<16x8xf32>)
33+
// CHECK-SAME: outs(%[[C]] : tensor<16x8xf32>)
3434
//
35-
func.func @sub(%A : memref<16x8xf32>, %B: memref<16x8xf32>, %C : memref<16x8xf32>) {
36-
linalg.sub ins(%A, %B : memref<16x8xf32>, memref<16x8xf32>) outs(%C : memref<16x8xf32>)
37-
return
35+
func.func @sub(%A : tensor<16x8xf32>, %B: tensor<16x8xf32>, %C : tensor<16x8xf32>) -> tensor<16x8xf32> {
36+
%sub = linalg.sub ins(%A, %B : tensor<16x8xf32>, tensor<16x8xf32>) outs(%C : tensor<16x8xf32>) -> tensor<16x8xf32>
37+
return %sub : tensor<16x8xf32>
3838
}
3939

4040
// ----
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: mlir-opt %s -linalg-morph-ops=named-to-generic | FileCheck %s --check-prefix=NAMED_TO_GENERIC
22
// RUN: mlir-opt %s -linalg-morph-ops=named-to-generic | mlir-opt %s -linalg-morph-ops=generic-to-named | \
3-
// RUN: FileCheck %s --check-prefix=GENERIC_TO_NAMED
3+
// RUN: FileCheck %s --check-prefix=ROUND_TRIP
44

55
func.func @exp(%A : tensor<16x8xf32>, %B : tensor<16x8xf32>) -> tensor<16x8xf32> {
66
%exp = linalg.exp ins(%A : tensor<16x8xf32>) outs(%B : tensor<16x8xf32>) -> tensor<16x8xf32>
@@ -10,5 +10,5 @@ func.func @exp(%A : tensor<16x8xf32>, %B : tensor<16x8xf32>) -> tensor<16x8xf32
1010
// NAMED_TO_GENERIC: linalg.generic
1111
// NAMED_TO_GENERIC-NOT: linalg.exp
1212

13-
// GENERIC_TO_NAMED: linalg.exp
14-
// GENERIC_TO_NAMED-NOT: linalg.generic
13+
// ROUND_TRIP: linalg.exp
14+
// ROUND_TRIP-NOT: linalg.generic

0 commit comments

Comments
 (0)