An Op to permute tensors across replicated TPU instances.
Each instance supplies its own input.
For example, suppose there are 4 TPU instances: `[A, B, C, D]`. Passing source_target_pairs=`[[0,1],[1,2],[2,3],[3,0]]` gets the outputs: `[D, A, B, C]`.
Constants
String | OP_NAME | The name of this op, as known by TensorFlow core engine |
Public Methods
Output<T> |
asOutput()
Returns the symbolic handle of the tensor.
|
static <T extends TType> CollectivePermute<T> | |
Output<T> |
output()
The permuted input.
|
Inherited Methods
Constants
public static final String OP_NAME
The name of this op, as known by TensorFlow core engine
Public Methods
public Output<T> asOutput ()
Returns the symbolic handle of the tensor.
Inputs to TensorFlow operations are outputs of another TensorFlow operation. This method is used to obtain a symbolic handle that represents the computation of the input.
public static CollectivePermute<T> create (Scope scope, Operand<T> input, Operand<TInt32> sourceTargetPairs)
Factory method to create a class wrapping a new CollectivePermute operation.
Parameters
scope | current scope |
---|---|
input | The local input to be permuted. Currently only supports float and bfloat16. |
sourceTargetPairs | A tensor with shape [num_pairs, 2]. |
Returns
- a new instance of CollectivePermute