File tree Expand file tree Collapse file tree 3 files changed +0
-44
lines changed
include/mlir/Dialect/Tosa/IR Expand file tree Collapse file tree 3 files changed +0
-44
lines changed Original file line number Diff line number Diff line change @@ -1331,8 +1331,6 @@ def Tosa_ExpOp : Tosa_ElementwiseUnaryOp<"exp"> {
13311331 Extension<[Tosa_EXT_BF16]>,
13321332 ];
13331333
1334- let hasFolder = 1;
1335-
13361334 let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
13371335}
13381336
@@ -1385,8 +1383,6 @@ def Tosa_LogOp : Tosa_ElementwiseUnaryOp<"log"> {
13851383 Extension<[Tosa_EXT_BF16]>,
13861384 ];
13871385
1388- let hasFolder = 1;
1389-
13901386 let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
13911387}
13921388
Original file line number Diff line number Diff line change @@ -1562,26 +1562,6 @@ OpFoldResult TransposeOp::fold(FoldAdaptor adaptor) {
15621562 return getInput1 ();
15631563}
15641564
1565- OpFoldResult tosa::LogOp::fold (FoldAdaptor adaptor) {
1566- auto input = getInput1 ();
1567- // Element-wise log(exp(x)) = x
1568- if (auto op = input.getDefiningOp <tosa::ExpOp>()) {
1569- return op.getInput1 ();
1570- }
1571-
1572- return {};
1573- }
1574-
1575- OpFoldResult tosa::ExpOp::fold (FoldAdaptor adaptor) {
1576- auto input = getInput1 ();
1577- // Element-wise exp(log(x)) = x
1578- if (auto op = input.getDefiningOp <tosa::LogOp>()) {
1579- return op.getInput1 ();
1580- }
1581-
1582- return {};
1583- }
1584-
15851565OpFoldResult tosa::NegateOp::fold (FoldAdaptor adaptor) {
15861566 // Element-wise negate(negate(x)) = x
15871567 // iff all zero points are constant 0
Original file line number Diff line number Diff line change @@ -1104,26 +1104,6 @@ func.func @canonicalize_pad_slice_dynamic_noupdate(%arg0: tensor<1x16x?x3xf32>)
11041104
11051105// -----
11061106
1107- // CHECK-LABEL: @fold_log_exp
1108- func.func @fold_log_exp (%arg0: tensor <?x1 xf32 >) -> tensor <?x1 xf32 > {
1109- // CHECK: return %arg{{.*}} : tensor<?x1xf32>
1110- %0 = tosa.exp %arg0 : (tensor <?x1 xf32 >) -> tensor <?x1 xf32 >
1111- %1 = tosa.log %0 : (tensor <?x1 xf32 >) -> tensor <?x1 xf32 >
1112- return %1 : tensor <?x1 xf32 >
1113- }
1114-
1115- // -----
1116-
1117- // CHECK-LABEL: @fold_exp_log
1118- func.func @fold_exp_log (%arg0: tensor <?x1 xf32 >) -> tensor <?x1 xf32 > {
1119- // CHECK: return %arg{{.*}} : tensor<?x1xf32>
1120- %0 = tosa.log %arg0 : (tensor <?x1 xf32 >) -> tensor <?x1 xf32 >
1121- %1 = tosa.exp %0 : (tensor <?x1 xf32 >) -> tensor <?x1 xf32 >
1122- return %1 : tensor <?x1 xf32 >
1123- }
1124-
1125- // -----
1126-
11271107// CHECK-LABEL: @fold_negate_negate
11281108func.func @fold_negate_negate (%arg0: tensor <?x1 xf32 >) -> tensor <?x1 xf32 > {
11291109 // CHECK: return %arg{{.*}} : tensor<?x1xf32>
You can’t perform that action at this time.
0 commit comments