<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/probability/blob/v0.25.0/tensorflow_probability/python/experimental/auto_batching/instructions.py#L353-L430) |

A basic block.

#### View aliases


**Main aliases**

[`tfp.experimental.auto_batching.frontend.instructions.Block`](https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/auto_batching/instructions/Block), [`tfp.experimental.auto_batching.frontend.st.inst.Block`](https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/auto_batching/instructions/Block), [`tfp.experimental.auto_batching.frontend.stack.inst.Block`](https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/auto_batching/instructions/Block), [`tfp.experimental.auto_batching.stack_optimization.inst.Block`](https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/auto_batching/instructions/Block), [`tfp.experimental.auto_batching.stackless.inst.Block`](https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/auto_batching/instructions/Block)

<br />

    tfp.experimental.auto_batching.instructions.Block(
        instructions=None, terminator=None, name=None
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `instructions` | A list of `PrimOp`, `PopOp`, and `FunctionCallOp` instructions to execute in order. Control transfer instructions (that do not return) are not permitted in this list. |
| `terminator` | A single `BranchOp`, `GotoOp`, `PushGotoOp` or `IndirectGotoOp`, indicating how to transfer control out of this basic block. |
| `name` | An object serving as the name of this `Block`, for display. |

<br />

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `label_str` | A string suitable for referring to this `Block` in printed output. |

<br />

## Methods

### `assign_instructions`

[View source](https://github.com/tensorflow/probability/blob/v0.25.0/tensorflow_probability/python/experimental/auto_batching/instructions.py#L381-L395)

    assign_instructions(
        instructions
    )

Assigns the body `instructions` and the `terminator` at once.

This is a convenience method, to set a `Block`'s program content
in one invocation instead of having to assign the `instructions`
and the `terminator` fields separately.

<br />

<br />

<br />

| Args ||
|---|---|
| `instructions` | A non-empty Python list of `Op` objects. The last one must be a `BranchOp`, `GotoOp`, `PushGotoOp`, or `IndirectGotoOp`, and becomes the `terminator`. The others, if any, must be `PrimOp`, `PopOp`, or `FunctionCallOp`, and become the `instructions`, in order. |

<br />