Add accessor for associated tf_executor.NextIteration.Source of a tf_executor.NextIteration.Sink, similar to reverse accessor already present.

PiperOrigin-RevId: 338765794
Change-Id: Ied4572220e0a742c34bfefedbb1161fcf804fddd
This commit is contained in:
Andy Ly 2020-10-23 16:30:01 -07:00 committed by TensorFlower Gardener
parent 893afc2067
commit 09338295b0
2 changed files with 8 additions and 0 deletions

View File

@ -824,6 +824,10 @@ LogicalResult Verify(NextIterationSinkOp sink) {
} // anonymous namespace
NextIterationSourceOp NextIterationSinkOp::GetSource() {
return cast<NextIterationSourceOp>(token().getDefiningOp());
}
//===----------------------------------------------------------------------===//
// tf_executor.Exit
//===----------------------------------------------------------------------===//

View File

@ -542,6 +542,10 @@ def TfExecutor_NextIterationSinkOp : TfExecutor_Op<"NextIteration.Sink",
}]>
];
let extraClassDeclaration = [{
NextIterationSourceOp GetSource();
}];
let assemblyFormat = " `[` $token `]` $input (`,` $controlInputs^)? `:` type($input) attr-dict";
let printer = ?;