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

Function core

tensorflow/python/tpu/tpu.py:154–163  ·  view source on GitHub ↗

Returns the device name for a core in a replicated TPU computation. Args: num: the virtual core number within each replica to which operators should be assigned. Returns: A device name, suitable for passing to `tf.device()`.

(num)

Source from the content-addressed store, hash-verified

152
153@tf_export(v1=["tpu.core"])
154def core(num):
155 """Returns the device name for a core in a replicated TPU computation.
156
157 Args:
158 num: the virtual core number within each replica to which operators should
159 be assigned.
160 Returns:
161 A device name, suitable for passing to `tf.device()`.
162 """
163 return "device:TPU_REPLICATED_CORE:{}".format(num)
164
165
166def _enclosing_tpu_context_and_graph():

Callers 2

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected