<br />

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

Fetches the layout of a DTensor.

```python
tf.experimental.dtensor.fetch_layout(
    tensor: `tf.Tensor`
) -> `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 />