From 98f64b4da1afb7ca2c96de75d5c9cbe628ce3976 Mon Sep 17 00:00:00 2001 From: River Riddle Date: Wed, 16 Oct 2019 00:35:07 -0700 Subject: [PATCH] NFC: Remove NoSideEffect traits from all ops except for ConstantOp. These traits are added in chapter 3 when we begin discussion optimization on the toy operations. PiperOrigin-RevId: 274974010 --- mlir/examples/toy/Ch2/include/toy/Ops.td | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mlir/examples/toy/Ch2/include/toy/Ops.td b/mlir/examples/toy/Ch2/include/toy/Ops.td index 59a4ff522810..8ad52e28b3d2 100644 --- a/mlir/examples/toy/Ch2/include/toy/Ops.td +++ b/mlir/examples/toy/Ch2/include/toy/Ops.td @@ -92,7 +92,7 @@ def ConstantOp : Toy_Op<"constant", [NoSideEffect]> { let verifier = [{ return ::verify(*this); }]; } -def AddOp : Toy_Op<"add", [NoSideEffect]> { +def AddOp : Toy_Op<"add"> { let summary = "element-wise addition operation"; let description = [{ The "add" operation performs element-wise addition between two tensors. @@ -144,7 +144,7 @@ def GenericCallOp : Toy_Op<"generic_call"> { ]; } -def MulOp : Toy_Op<"mul", [NoSideEffect]> { +def MulOp : Toy_Op<"mul"> { let summary = "element-wise multiplication operation"; let description = [{ The "mul" operation performs element-wise multiplication between two @@ -173,7 +173,7 @@ def PrintOp : Toy_Op<"print"> { let arguments = (ins F64Tensor:$input); } -def ReshapeOp : Toy_Op<"reshape", [NoSideEffect]> { +def ReshapeOp : Toy_Op<"reshape"> { let summary = "tensor reshape operation"; let description = [{ Reshape operation is transforming its input tensor into a new tensor with @@ -224,7 +224,7 @@ def ReturnOp : Toy_Op<"return", [Terminator, HasParent<"FuncOp">]> { let verifier = [{ return ::verify(*this); }]; } -def TransposeOp : Toy_Op<"transpose", [NoSideEffect]> { +def TransposeOp : Toy_Op<"transpose"> { let summary = "transpose operation"; let arguments = (ins F64Tensor:$input);