2020-05-07 09:41:54 +08:00
|
|
|
// RUN: npcomp-opt <%s -pass-pipeline=e2e-lowering-pipeline | FileCheck %s --dump-input=fail
|
2020-06-02 10:30:13 +08:00
|
|
|
// RUN: npcomp-opt <%s -pass-pipeline=e2e-lowering-pipeline{optimize} | FileCheck %s --dump-input=fail
|
2020-05-07 09:41:54 +08:00
|
|
|
|
2020-05-15 05:57:09 +08:00
|
|
|
// This is the simplest case, which is easy to stare at for debugging
|
|
|
|
// purposes.
|
|
|
|
|
2020-05-07 09:41:54 +08:00
|
|
|
// CHECK-LABEL: func @rank1
|
|
|
|
func @rank1(%arg0: tensor<?xf32>, %arg1: tensor<?xf32>) -> tensor<?xf32> {
|
|
|
|
%0 = "tcf.add"(%arg0, %arg1) : (tensor<?xf32>, tensor<?xf32>) -> tensor<?xf32>
|
|
|
|
return %0 : tensor<?xf32>
|
|
|
|
}
|
2020-08-03 13:06:12 +08:00
|
|
|
|
|
|
|
// -----
|
|
|
|
// CHECK-LABEL: func @multiple_ops
|
|
|
|
func @multiple_ops(%arg0: tensor<f32>, %arg1: tensor<?xf32>, %arg2: tensor<?x?xf32>) -> tensor<?x?xf32> {
|
|
|
|
%0 = "tcf.add"(%arg1, %arg2) : (tensor<?xf32>, tensor<?x?xf32>) -> tensor<?x?xf32>
|
|
|
|
%1 = "tcf.add"(%arg0, %0) : (tensor<f32>, tensor<?x?xf32>) -> tensor<?x?xf32>
|
|
|
|
return %1 : tensor<?x?xf32>
|
|
|
|
}
|