LostTech.TensorFlow : API Documentation

Type DeviceAssignment

Namespace tensorflow.tpu.experimental

Parent PythonObjectContainer

Interfaces IDeviceAssignment

Mapping from logical cores in a computation to the physical TPU topology.

Prefer to use the `DeviceAssignment.build()` helper to construct a `DeviceAssignment`; it is easier if less flexible than constructing a `DeviceAssignment` directly.

Methods

Properties

Public instance methods

ValueTuple coordinates(int replica, int logical_core)

Returns the physical topology coordinates of a logical core.

object coordinates_dyn(object replica, object logical_core)

Returns the physical topology coordinates of a logical core.

string host_device(int replica, int logical_core, string job)

Returns the CPU device attached to a logical core.

object host_device_dyn(ImplicitContainer<T> replica, ImplicitContainer<T> logical_core, object job)

Returns the CPU device attached to a logical core.

object lookup_replicas_dyn(object task_id, object logical_core)

Lookup replica ids by task number and logical core.
Parameters
object task_id
TensorFlow task number.
object logical_core
An integer, identifying a logical core.
Returns
object
A sorted list of the replicas that are attached to that task and logical_core.

string tpu_device(int replica, int logical_core, object job)

Returns the name of the TPU device assigned to a logical core.

object tpu_device_dyn(ImplicitContainer<T> replica, ImplicitContainer<T> logical_core, object job)

Returns the name of the TPU device assigned to a logical core.

object tpu_ordinal(int replica, int logical_core)

Returns the ordinal of the TPU device assigned to a logical core.

object tpu_ordinal_dyn(ImplicitContainer<T> replica, ImplicitContainer<T> logical_core)

Returns the ordinal of the TPU device assigned to a logical core.

Public static methods

DeviceAssignment build(object topology, object computation_shape, object computation_stride, int num_replicas)

object build_dyn(object topology, object computation_shape, object computation_stride, ImplicitContainer<T> num_replicas)

Public properties

object core_assignment get;

The logical to physical core mapping.

object core_assignment_dyn get;

The logical to physical core mapping.

object num_cores_per_replica get;

The number of cores per replica.

object num_cores_per_replica_dyn get;

The number of cores per replica.

object num_replicas get;

The number of replicas of the computation.

object num_replicas_dyn get;

The number of replicas of the computation.

object PythonObject get;

object topology get;

A `Topology` that describes the TPU topology.

object topology_dyn get;

A `Topology` that describes the TPU topology.