[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
This commit is contained in:
parent
87d9e6951e
commit
3ca740103d
|
@ -79,7 +79,8 @@ class HLOClient_BroadcastBinaryElementwiseOp<
|
|||
string mnemonic, list<OpTrait> traits> :
|
||||
HLOClient_Op<mnemonic,
|
||||
!listconcat(traits, [
|
||||
DeclareOpInterfaceMethods<InferShapedTypeOpInterface>])> {
|
||||
DeclareOpInterfaceMethods<InferShapedTypeOpInterface,
|
||||
["reifyReturnTypeShapes"]>])> {
|
||||
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<Value>& reifiedReturnShapes);
|
||||
}];
|
||||
}
|
||||
|
||||
def HLOClient_BroadcastAddOp : HLOClient_BroadcastBinaryElementwiseOp<"broadcast_add",
|
||||
|
|
Loading…
Reference in New Issue