2020-09-25 08:14:21 +08:00
|
|
|
// RUN: npcomp-opt <%s | npcomp-opt | FileCheck %s --dump-input=fail
|
2020-05-07 09:41:54 +08:00
|
|
|
|
2020-09-22 10:14:27 +08:00
|
|
|
// CHECK-LABEL: func @binary_elementwise
|
|
|
|
func @binary_elementwise(%arg0: tensor<?xf32>, %arg1: tensor<?xf32>) {
|
2020-09-19 05:05:36 +08:00
|
|
|
// CHECK: tcf.add %arg0, %arg1 : (tensor<?xf32>, tensor<?xf32>) -> tensor<?xf32>
|
2020-09-22 10:14:27 +08:00
|
|
|
// CHECK: tcf.max %arg0, %arg1 : (tensor<?xf32>, tensor<?xf32>) -> tensor<?xf32>
|
2020-09-25 08:14:21 +08:00
|
|
|
// CHECK: tcf.exp %arg0 : tensor<?xf32>
|
2020-09-19 05:05:36 +08:00
|
|
|
%0 = tcf.add %arg0, %arg1 : (tensor<?xf32>, tensor<?xf32>) -> tensor<?xf32>
|
2020-09-22 10:14:27 +08:00
|
|
|
%1 = tcf.max %arg0, %arg1 : (tensor<?xf32>, tensor<?xf32>) -> tensor<?xf32>
|
2020-09-25 08:14:21 +08:00
|
|
|
%2 = tcf.exp %arg0 : tensor<?xf32>
|
2020-05-07 09:41:54 +08:00
|
|
|
return
|
|
|
|
}
|
2020-09-18 09:56:01 +08:00
|
|
|
|
2020-09-22 10:14:27 +08:00
|
|
|
// CHECK-LABEL: func @matmul
|
2020-09-18 09:56:01 +08:00
|
|
|
func @matmul(%arg0: tensor<?x?xf32>, %arg1: tensor<?x?xf32>) -> tensor<?x?xf32> {
|
|
|
|
// CHECK: tcf.matmul %arg0, %arg1 : (tensor<?x?xf32>, tensor<?x?xf32>) -> tensor<?x?xf32>
|
|
|
|
%0 = tcf.matmul %arg0, %arg1 : (tensor<?x?xf32>, tensor<?x?xf32>) -> tensor<?x?xf32>
|
|
|
|
return %0 : tensor<?x?xf32>
|
|
|
|
}
|
2020-12-16 04:53:12 +08:00
|
|
|
|
|
|
|
// CHECK-LABEL: func @conv_2d_nchw
|
|
|
|
func @conv_2d_nchw(%arg0: tensor<?x?x?x?xf32>, %arg1: tensor<?x?x?x?xf32>) -> tensor<?x?x?x?xf32> {
|
|
|
|
// CHECK: tcf.conv_2d_nchw %arg0, %arg1 : (tensor<?x?x?x?xf32>, tensor<?x?x?x?xf32>) -> tensor<?x?x?x?xf32>
|
|
|
|
%0 = tcf.conv_2d_nchw %arg0, %arg1 : (tensor<?x?x?x?xf32>, tensor<?x?x?x?xf32>) -> tensor<?x?x?x?xf32>
|
|
|
|
return %0 : tensor<?x?x?x?xf32>
|
|
|
|
}
|