# tf.experimental.dtensor.fetch_layout

<br />

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

Fetches the layout of a DTensor.

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

<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 />