MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / device_coordinates

Method device_coordinates

tensorflow/python/tpu/topology.py:150–161  ·  view source on GitHub ↗

Describes the mapping from TPU devices to topology coordinates. Returns: A rank 3 int32 array with shape `[tasks, devices, axis]`. `tasks` is the number of tasks in the TPU cluster, `devices` is the number of TPU devices per task, and `axis` is the number of axes in the TPU

(self)

Source from the content-addressed store, hash-verified

148
149 @property
150 def device_coordinates(self):
151 """Describes the mapping from TPU devices to topology coordinates.
152
153 Returns:
154 A rank 3 int32 array with shape `[tasks, devices, axis]`.
155 `tasks` is the number of tasks in the TPU cluster, `devices` is the number
156 of TPU devices per task, and `axis` is the number of axes in the TPU
157 cluster topology. Each entry gives the `axis`-th coordinate in the
158 topology of a task/device pair. TPU topologies are 3-dimensional, with
159 dimensions `(x, y, core number)`.
160 """
161 return self._device_coordinates
162
163 def task_ordinal_at_coordinates(self, device_coordinates):
164 """Returns the TensorFlow task number attached to `device_coordinates`.

Callers 2

InitializeTPUMethod · 0.80
ParseTopologyAttrFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected