ReplicateMetadata

public final class ReplicateMetadata

Metadata indicating how the TPU computation should be replicated.

This operation holds the metadata common to operations of a `tpu.replicate()` computation subgraph.

Nested Classes

class ReplicateMetadata.Options Optional attributes for ReplicateMetadata  

Constants

String OP_NAME The name of this op, as known by TensorFlow core engine

Public Methods

static ReplicateMetadata.Options
allowSoftPlacement(Boolean allowSoftPlacement)
static ReplicateMetadata.Options
computationShape(List<Long> computationShape)
static ReplicateMetadata
create(Scope scope, Long numReplicas, Options... options)
Factory method to create a class wrapping a new ReplicateMetadata operation.
static ReplicateMetadata.Options
deviceAssignment(List<Long> deviceAssignment)
static ReplicateMetadata.Options
hostComputeCore(List<String> hostComputeCore)
static ReplicateMetadata.Options
numCoresPerReplica(Long numCoresPerReplica)
static ReplicateMetadata.Options
paddingMap(List<String> paddingMap)
static ReplicateMetadata.Options
stepMarkerLocation(String stepMarkerLocation)
static ReplicateMetadata.Options
topology(String topology)
static ReplicateMetadata.Options
useSpmdForXlaPartitioning(Boolean useSpmdForXlaPartitioning)
static ReplicateMetadata.Options
useTpu(Boolean useTpu)

Inherited Methods

org.tensorflow.op.RawOp
final boolean
equals(Object obj)
final int
Operation
op()
Return this unit of computation as a single Operation.
final String
boolean
equals(Object arg0)
final Class<?>
getClass()
int
hashCode()
final void
notify()
final void
notifyAll()
String
toString()
final void
wait(long arg0, int arg1)
final void
wait(long arg0)
final void
wait()
org.tensorflow.op.Op
abstract ExecutionEnvironment
env()
Return the execution environment this op was created in.
abstract Operation
op()
Return this unit of computation as a single Operation.

Constants

public static final String OP_NAME

The name of this op, as known by TensorFlow core engine

Constant Value: "TPUReplicateMetadata"

Public Methods

public static ReplicateMetadata.Options allowSoftPlacement (Boolean allowSoftPlacement)

public static ReplicateMetadata.Options computationShape (List<Long> computationShape)

Parameters
computationShape DEPRECATED. Use num_cores_per_replica instead.

public static ReplicateMetadata create (Scope scope, Long numReplicas, Options... options)

Factory method to create a class wrapping a new ReplicateMetadata operation.

Parameters
scope current scope
numReplicas Number of replicas of the computation
options carries optional attributes values
Returns
  • a new instance of ReplicateMetadata

public static ReplicateMetadata.Options deviceAssignment (List<Long> deviceAssignment)

Parameters
deviceAssignment The assignment of devices for the computation.

public static ReplicateMetadata.Options hostComputeCore (List<String> hostComputeCore)

public static ReplicateMetadata.Options numCoresPerReplica (Long numCoresPerReplica)

Parameters
numCoresPerReplica Number of cores per replica. Used for model parallelism.

public static ReplicateMetadata.Options paddingMap (List<String> paddingMap)

public static ReplicateMetadata.Options stepMarkerLocation (String stepMarkerLocation)

public static ReplicateMetadata.Options topology (String topology)

Parameters
topology TopologyProto indicating the topology of the TPU pod slice.

public static ReplicateMetadata.Options useSpmdForXlaPartitioning (Boolean useSpmdForXlaPartitioning)

public static ReplicateMetadata.Options useTpu (Boolean useTpu)

Parameters
useTpu Whether to place the computation on the TPU.