diff --git a/include/mlir-hlo/Dialect/mhlo/IR/hlo_ops.td b/include/mlir-hlo/Dialect/mhlo/IR/hlo_ops.td index f37ae03..c71e39d 100644 --- a/include/mlir-hlo/Dialect/mhlo/IR/hlo_ops.td +++ b/include/mlir-hlo/Dialect/mhlo/IR/hlo_ops.td @@ -119,31 +119,30 @@ def HLO_CreateTokenOp : HLO_Op<"create_token", [NoSideEffect]> { // See https://www.tensorflow.org/xla/operation_semantics#element-wise_unary_functions class HLO_UnaryElementwiseOp traits, - Type TensorType>: HLO_Op { - let arguments = (ins TensorType:$operand); - let results = (outs TensorType); - let extraClassDeclaration = [{ - static LogicalResult inferReturnTypeComponents( - MLIRContext* context, Optional location, - ValueRange operands, DictionaryAttr attributes, RegionRange regions, - SmallVectorImpl& inferedReturnShapes) { - return failure(); - } - LogicalResult reifyReturnTypeShapes( - OpBuilder& builder, SmallVectorImpl& reifiedReturnShapes) { - return ::mlir::mhlo::deriveShapeFromFirstOperand(&builder, getOperation(), - &reifiedReturnShapes); - } - bool inferInputOutputShapeEquality(int input, int output) { - return true; - } - llvm::Optional inferEffectiveWorkloadShape() { - return getOperation()->getResult(0); - } - }]; + Type TensorType> : HLO_Op { + let arguments = (ins TensorType:$operand); + let results = (outs TensorType); + let extraClassDeclaration = [{ + static LogicalResult inferReturnTypeComponents( + MLIRContext* context, Optional location, + ValueRange operands, DictionaryAttr attributes, RegionRange regions, + SmallVectorImpl& inferedReturnShapes) { + return failure(); + } + LogicalResult reifyReturnTypeShapes( + OpBuilder& builder, SmallVectorImpl& reifiedReturnShapes) { + return ::mlir::mhlo::deriveShapeFromFirstOperand(&builder, getOperation(), + &reifiedReturnShapes); + } + bool inferInputOutputShapeEquality(int input, int output) { + return true; + } + llvm::Optional inferEffectiveWorkloadShape() { + return getOperation()->getResult(0); + } + }]; } // Abs supports complex to real, so element type is not guaranteed to match.