diff options
| author | River Riddle <riverriddle@google.com> | 2019-10-16 00:35:07 -0700 | 
|---|---|---|
| committer | A. Unique TensorFlower <gardener@tensorflow.org> | 2019-10-16 00:35:43 -0700 | 
| commit | 98f64b4da1afb7ca2c96de75d5c9cbe628ce3976 (patch) | |
| tree | 1398d6d6a9f90ba2eaa41df7fbde6b0c5e37396a | |
| parent | a08482c1ad67002be80fefd2d0f8116941f37d02 (diff) | |
| download | bcm5719-llvm-98f64b4da1afb7ca2c96de75d5c9cbe628ce3976.tar.gz bcm5719-llvm-98f64b4da1afb7ca2c96de75d5c9cbe628ce3976.zip | |
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
| -rw-r--r-- | mlir/examples/toy/Ch2/include/toy/Ops.td | 8 | 
1 files 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 59a4ff52281..8ad52e28b3d 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); | 

