From 3ca740103d2f4d9378f44b5aa57955674a2d2d96 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Wed, 23 Sep 2020 10:07:39 -0700 Subject: [PATCH] [NFC] Specify "reifyReturnTypeShapes" in DeclareOpInterfaceMethod overridenMethods - This causes declaration of reifyReturnTypeShapes to be inserted in the TableGen generated code without explicitly adding it in extraClassDeclaration. PiperOrigin-RevId: 333315601 --- include/mlir-hlo/Dialect/mhlo/IR/chlo_ops.td | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/include/mlir-hlo/Dialect/mhlo/IR/chlo_ops.td b/include/mlir-hlo/Dialect/mhlo/IR/chlo_ops.td index 99a6d08..92ae4d2 100644 --- a/include/mlir-hlo/Dialect/mhlo/IR/chlo_ops.td +++ b/include/mlir-hlo/Dialect/mhlo/IR/chlo_ops.td @@ -79,7 +79,8 @@ class HLOClient_BroadcastBinaryElementwiseOp< string mnemonic, list traits> : HLOClient_Op])> { + DeclareOpInterfaceMethods])> { let arguments = (ins HLO_Tensor:$lhs, HLO_Tensor:$rhs, @@ -99,13 +100,6 @@ class HLOClient_BroadcastBinaryElementwiseOp< $lhs `,` $rhs attr-dict `:` `(` type($lhs) `,` type($rhs) `)` `->` type(results) }]; - - let extraClassDeclaration = [{ - // TODO(laurenzo): It isn't clear to me why reifyReturnShapes does not - // have its declaration generated by DeclareOpInterfaceMethods. - LogicalResult reifyReturnTypeShapes( - OpBuilder& builder, SmallVectorImpl& reifiedReturnShapes); - }]; } def HLOClient_BroadcastAddOp : HLOClient_BroadcastBinaryElementwiseOp<"broadcast_add",