# tf.tpu.experimental.initialize_tpu_system

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.13.1/tensorflow/python/tpu/tpu_strategy_util.py#L46-L172) |

Initialize the TPU devices.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.tpu.experimental.initialize_tpu_system`](https://www.tensorflow.org/api_docs/python/tf/tpu/experimental/initialize_tpu_system)

<br />

    tf.tpu.experimental.initialize_tpu_system(
        cluster_resolver=None
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `cluster_resolver` | A tf.distribute.cluster_resolver.TPUClusterResolver, which provides information about the TPU cluster. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| The tf.tpu.Topology object for the topology of the TPU cluster. If called inside tf.function, it returns the serialized topology object instead. ||

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `RuntimeError` | If running inside a tf.function. |
| `NotFoundError` | If no TPU devices found in eager mode. |

<br />