2020-10-10 06:03:57 +08:00
|
|
|
// RUN: npcomp-opt <%s -pass-pipeline=tcf-refback-lowering-pipeline | FileCheck %s --dump-input=fail
|
|
|
|
// RUN: npcomp-opt <%s -pass-pipeline=tcf-refback-lowering-pipeline{optimize} | FileCheck %s --dump-input=fail
|
2020-05-15 05:57:09 +08:00
|
|
|
|
|
|
|
// CHECK-LABEL: func @rank1
|
|
|
|
func @rank1(%arg0: tensor<?xf32>, %arg1: tensor<?xf32>) -> tensor<?xf32> {
|
2020-09-19 05:05:36 +08:00
|
|
|
%0 = tcf.add %arg0, %arg1 : (tensor<?xf32>, tensor<?xf32>) -> tensor<?xf32>
|
2020-05-15 05:57:09 +08:00
|
|
|
return %0 : tensor<?xf32>
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK-LABEL: func @rank2
|
|
|
|
func @rank2(%arg0: tensor<?x?xf32>, %arg1: tensor<?x?xf32>) -> tensor<?x?xf32> {
|
2020-09-19 05:05:36 +08:00
|
|
|
%0 = tcf.add %arg0, %arg1 : (tensor<?x?xf32>, tensor<?x?xf32>) -> tensor<?x?xf32>
|
2020-05-15 05:57:09 +08:00
|
|
|
return %0 : tensor<?x?xf32>
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHxCK-LABEL: func @rank1and2
|
|
|
|
func @rank1and2(%arg0: tensor<?xf32>, %arg1: tensor<?x?xf32>) -> tensor<?x?xf32> {
|
2020-09-19 05:05:36 +08:00
|
|
|
%0 = tcf.add %arg0, %arg1 : (tensor<?xf32>, tensor<?x?xf32>) -> tensor<?x?xf32>
|
2020-05-15 05:57:09 +08:00
|
|
|
return %0 : tensor<?x?xf32>
|
|
|
|
}
|