Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Commit

Permalink
add relu6 op
Browse files Browse the repository at this point in the history
  • Loading branch information
Yancey1989 authored and TanyoKwok committed Aug 31, 2022
1 parent 46776ff commit 9c70413
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions include/torch-mlir/Dialect/Torch/IR/GeneratedTorchOps.td
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,54 @@ def Torch_AtenRelu_Op : Torch_Op<"aten.relu_", [
}];
}


def Torch_AtenRelu6Op : Torch_Op<"aten.relu6", [
AllowsTypeRefinement,
HasValueSemantics,
ReadOnly
]> {
let summary = "Generated op for `aten::relu6 : (Tensor) -> (Tensor)`";
let arguments = (ins
AnyTorchTensorType:$self
);
let results = (outs
AnyTorchTensorType:$result
);
let hasCustomAssemblyFormat = 1;
let extraClassDefinition = [{
ParseResult AtenRelu6Op::parse(OpAsmParser &parser, OperationState &result) {
return parseDefaultTorchOp(parser, result, 1, 1);
}
void AtenRelu6Op::print(OpAsmPrinter &printer) {
printDefaultTorchOp(printer, *this, 1, 1);
}
}];
}

def Torch_AtenRelu6_Op : Torch_Op<"aten.relu6_", [
AllowsTypeRefinement,
HasValueSemantics,
ReadOnly
]> {
let summary = "Generated op for `aten::relu6_ : (Tensor) -> (Tensor)`";
let arguments = (ins
AnyTorchTensorType:$self
);
let results = (outs
AnyTorchTensorType:$result
);
let hasCustomAssemblyFormat = 1;
let extraClassDefinition = [{
ParseResult AtenRelu6_Op::parse(OpAsmParser &parser, OperationState &result) {
return parseDefaultTorchOp(parser, result, 1, 1);
}
void AtenRelu6_Op::print(OpAsmPrinter &printer) {
printDefaultTorchOp(printer, *this, 1, 1);
}
}];
}


def Torch_AtenLeakyReluOp : Torch_Op<"aten.leaky_relu", [
AllowsTypeRefinement,
HasValueSemantics,
Expand Down

0 comments on commit 9c70413

Please sign in to comment.