<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.21.0/tensorflow/dtensor/python/api.py#L379-L392) |

Fetches the layout of a DTensor.

    tf.experimental.dtensor.fetch_layout(
        tensor: https://www.tensorflow.org/api_docs/python/tf/Tensor
    ) -> https://www.tensorflow.org/api_docs/python/tf/experimental/dtensor/Layout

### Used in the notebooks

| Used in the guide |
|---|
| - [DTensor concepts](https://www.tensorflow.org/guide/dtensor_overview) |

<br />

<br />

<br />

| ## Args ||
|---|---|
| `tensor` | The DTensor whose layout is to be fetched. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| The `Layout` of this DTensor. ||

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `RuntimeError` | When not called eagerly. |

<br />