tf.experimental.dtensor.num_local_devices

Returns the number of devices of device_type attached to this client.