tfp.experimental.auto_batching.instructions.ControlFlowGraph

A control flow graph (CFG).

blocks Python list of Block objects, the content of the CFG. Any terminator instructions of said Block objects should refer to other Blocks in the same CFG. Otherwise, downstream passes or staging may fail.

blocks

Methods

block

View source

Returns the Block given by the input index.

Args
index A Python int.

Returns
block The Block at that location in the block list.

block_index

View source

Returns the int index of the given Block.

Args
block The block to look up. If None, returns the exit index.

Returns
index Python int, the index of the requested block.

enter_block

View source

Returns the entry Block.

exit_index

View source

Returns the int index denoting "exit this CFG".