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-08-03 13:06:12 +08:00
|
|
|
|
|
|
|
// -----
|
|
|
|
// CHECK-LABEL: func @global_add
|
2020-09-17 08:31:40 +08:00
|
|
|
func @global_add() -> tensor<2xf32> {
|
2020-09-19 05:05:36 +08:00
|
|
|
%c34 = constant dense<[3.000000e+00, 4.000000e+00]> : tensor<2xf32>
|
|
|
|
%c12 = constant dense<[1.000000e+00, 2.000000e+00]> : tensor<2xf32>
|
|
|
|
%0 = tcf.add %c34, %c12 : (tensor<2xf32>, tensor<2xf32>) -> tensor<2xf32>
|
|
|
|
%1 = tcf.add %c12, %0 : (tensor<2xf32>, tensor<2xf32>) -> tensor<2xf32>
|
2020-08-03 13:06:12 +08:00
|
|
|
return %1 : tensor<2xf32>
|
|
|
|
}
|