@Operator public final class BarrierTakeMany extends PrimitiveOp
This operation concatenates completed-element component tensors along the 0th dimension to make a single component tensor.
Elements come out of the barrier when they are complete, and in the order in which they were placed into the barrier. The indices output provides information about the batch in which each element was originally inserted into the barrier.
Modifier and Type | Class and Description |
---|---|
static class |
BarrierTakeMany.Options
Optional attributes for
BarrierTakeMany |
operation
Modifier and Type | Method and Description |
---|---|
static BarrierTakeMany.Options |
allowSmallBatch(Boolean allowSmallBatch) |
static BarrierTakeMany |
create(Scope scope,
Operand<String> handle,
Operand<Integer> numElements,
List<Class<?>> componentTypes,
BarrierTakeMany.Options... options)
Factory method to create a class wrapping a new BarrierTakeMany operation.
|
Output<Long> |
indices()
A one-dimensional tensor of indices, with length num_elems.
|
Output<String> |
keys()
A one-dimensional tensor of keys, with length num_elements.
|
static BarrierTakeMany.Options |
timeoutMs(Long timeoutMs) |
List<Output<?>> |
values()
One any-dimensional tensor per component in a barrier element.
|
static BarrierTakeMany.Options |
waitForIncomplete(Boolean waitForIncomplete) |
equals, hashCode, op, toString
public static BarrierTakeMany create(Scope scope, Operand<String> handle, Operand<Integer> numElements, List<Class<?>> componentTypes, BarrierTakeMany.Options... options)
scope
- current scopehandle
- The handle to a barrier.numElements
- A single-element tensor containing the number of elements to
take.componentTypes
- The type of each component in a value.options
- carries optional attributes valuespublic static BarrierTakeMany.Options allowSmallBatch(Boolean allowSmallBatch)
allowSmallBatch
- Allow to return less than num_elements items if barrier is
already closed.public static BarrierTakeMany.Options waitForIncomplete(Boolean waitForIncomplete)
waitForIncomplete
- public static BarrierTakeMany.Options timeoutMs(Long timeoutMs)
timeoutMs
- If the queue is empty, this operation will block for up to
timeout_ms milliseconds.
Note: This option is not supported yet.public Output<Long> indices()
Copyright © 2022. All rights reserved.