Represents a branch of a conditional control flow construct (i.e., true/false branch).
Type trait used for representing supported conditional construct branch function return types.
Base class for control flow contexts.
Base class for control flow contexts.
The usage pattern is a sequence of (Enter, Exit) ops followed by a final ExitResult op.
We maintain the following state for control flow contexts during graph construction:
controlFlowContext
field, which represents the current control flow context
used to construct new ops. It can be changed by context.enter()
and context.exit()
.
2. Each op has a controlFlowContext
field, which is the control flow context to which the op belongs. It is set
at the time the op is created and it is immutable.
3. Each Context has an outerContext
field, which is the control flow context in which this context is
created. It is set at the time a context is created and it is immutable.
4. Each Context has a contextStack
field, which contains the control flow contexts pushed and popped by
context.enter()
and context.exit()
.
Type trait used for representing supported while-loop construct loop variable types.
Base class for XLA and TPU control flow contexts.