# tf.experimental.dtensor.num_global_devices

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.14.0/tensorflow/dtensor/python/config.py#L80-L83) |

Returns the number of devices of device_type in this DTensor cluster.

    tf.experimental.dtensor.num_global_devices(
        device_type: str
    ) -> int