Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions circle-mlir/circle-mlir/lib/dialect/mlir/CircleOps.td
Original file line number Diff line number Diff line change
Expand Up @@ -1972,6 +1972,23 @@ def CIR_ShapeOp: CIR_Op<"shape", [
let hasFolder = 1;
}

def CIR_SignOp: CIR_Op<"sign", [
Pure,
SameOperandsAndResultType]> {
let summary = "Sign operation";
let description = [{
Returns NaN if x is NaN, 0 if x is 0, -1 if x < 0 and 1 if x > 0.
}];

let arguments = (ins
CIR_TensorOf<[F32, F64, I32]>:$x
);

let results = (outs
CIR_TensorOf<[F32, F64, I32]>:$output
);
}

def CIR_SinOp: CIR_Op<"sin", [
Pure,
/*TF_SameOperandsAndResultTypeResolveRef*/
Expand Down