public class CudaGridExecutioner extends CudaExecutioner implements GridExecutioner
Modifier and Type | Class and Description |
---|---|
protected static class |
CudaGridExecutioner.MetaType |
OpExecutioner.ExecutionMode
extraz, nativeOps, properties, tadManager
executionMode
Constructor and Description |
---|
CudaGridExecutioner() |
Modifier and Type | Method and Description |
---|---|
void |
addToWatchdog(INDArray array,
String tag) |
void |
aggregate(Aggregate op)
This method enqueues aggregate op for future invocation with respect to thread and op order
This method uses current thread Id as aggregation key.
|
void |
aggregate(Aggregate op,
long key)
This method enqueues aggregate op for future invocation.
|
protected void |
buildAggregation() |
protected GridOp |
buildGrid()
This method bundless all ops available in queue into single GridOp
|
protected void |
buildZ(Accumulation op,
int... dimension) |
protected void |
buildZ(IndexAccumulation op,
int... dimension) |
protected boolean |
compareArrays(INDArray array,
Op op) |
protected boolean |
compareDevicePointers(INDArray array,
Op op) |
protected boolean |
compareHostPointers(INDArray array,
Op op) |
protected void |
dequeueOp(OpDescriptor descriptor) |
protected void |
enqueueOp(OpDescriptor descriptor) |
INDArray |
exec(Accumulation op,
int... dimension) |
void |
exec(Aggregate op) |
INDArray |
exec(BroadcastOp op,
int... dimension) |
void |
exec(GridOp op) |
INDArray |
exec(IndexAccumulation op,
int... dimension) |
void |
exec(List<Aggregate> batch) |
void |
exec(MetaOp op) |
Op |
exec(Op op)
This is one of the main entry points for ops that are executed without respect to dimension.
|
Op |
exec(Op op,
int... dimension) |
INDArray |
exec(RandomOp op)
This method executes specified RandomOp using default RNG available via Nd4j.getRandom()
|
INDArray |
exec(RandomOp op,
Random rng) |
void |
flushQueue()
This method forces all currently enqueued ops to be executed immediately
PLEASE NOTE: This call IS non-blocking
|
void |
flushQueueBlocking()
This method forces all currently enqueued ops to be executed immediately
PLEASE NOTE: This call is always blocking, until all queued operations are finished
|
long |
getExecutionCounter() |
long |
getMetaCounter() |
protected CudaGridExecutioner.MetaType |
getMetaOpType(Op op,
int... dimension) |
int |
getQueueLength()
This method returns Op queue lengths for current device
PLEASE NOTE: This value also includes variative lastOp
|
protected int |
getQueueLength(int deviceId)
Deprecated.
|
protected CudaContext |
invoke(BroadcastOp op) |
protected CudaContext |
invoke(ScalarOp op) |
protected CudaContext |
invoke(TransformOp op) |
protected void |
invokeWatchdog(Op op) |
protected boolean |
isMatchingZX(Op opA,
Op opB)
This method checks, if opA and opB are sharing the same operands
|
protected boolean |
isMatchingZXY(Op opA,
Op opB)
This method is additional check, basically it qualifies possibility of InvertedPredicate MetaOp
|
protected boolean |
onCurrentDeviceXYZ(Op op) |
protected GridPointers |
pointerizeOp(OpDescriptor descriptor) |
protected GridPointers |
pointerizeOp(Op op,
int... dimensions)
This method returns Op as set of required pointers for it
|
protected void |
prepareGrid(MetaOp op) |
protected void |
processAsGridOp(Op op,
int... dimension) |
protected void |
purgeQueue() |
protected void |
pushToGrid(OpDescriptor descriptor) |
protected void |
pushToGrid(OpDescriptor descriptor,
boolean flush)
This method adds op into GridOp queue
|
exec, execAndReturn, getBuffer, getEnvironmentInformation, getNativeOps, intercept, invoke, invoke, naiveExec
checkForCompression, exec, execAndReturn, execAndReturn, execAndReturn, execAndReturn, execAndReturn, execAndReturn, executionMode, iterateOverAllColumns, iterateOverAllRows, setExecutionMode
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
exec, exec, execAndReturn, execAndReturn, execAndReturn, execAndReturn, execAndReturn, execAndReturn, execAndReturn, executionMode, getEnvironmentInformation, iterateOverAllColumns, iterateOverAllRows, setExecutionMode
public Op exec(Op op)
exec
in interface OpExecutioner
exec
in class CudaExecutioner
op
- protected void pushToGrid(OpDescriptor descriptor)
protected void invokeWatchdog(Op op)
protected void pushToGrid(OpDescriptor descriptor, boolean flush)
public long getMetaCounter()
public long getExecutionCounter()
protected void processAsGridOp(Op op, int... dimension)
protected boolean onCurrentDeviceXYZ(Op op)
protected void enqueueOp(OpDescriptor descriptor)
protected void dequeueOp(OpDescriptor descriptor)
protected CudaGridExecutioner.MetaType getMetaOpType(Op op, int... dimension)
protected boolean isMatchingZX(Op opA, Op opB)
opA
- opB
- protected boolean isMatchingZXY(Op opA, Op opB)
opA
- opB
- protected GridPointers pointerizeOp(OpDescriptor descriptor)
protected GridPointers pointerizeOp(Op op, int... dimensions)
op
- dimensions
- public int getQueueLength()
getQueueLength
in interface GridExecutioner
@Deprecated protected int getQueueLength(int deviceId)
deviceId
- protected GridOp buildGrid()
protected void buildZ(IndexAccumulation op, int... dimension)
protected void buildZ(Accumulation op, int... dimension)
public Op exec(Op op, int... dimension)
exec
in interface OpExecutioner
exec
in class CudaExecutioner
public INDArray exec(Accumulation op, int... dimension)
exec
in interface OpExecutioner
exec
in class CudaExecutioner
public INDArray exec(IndexAccumulation op, int... dimension)
exec
in interface OpExecutioner
exec
in class CudaExecutioner
public INDArray exec(BroadcastOp op, int... dimension)
exec
in interface OpExecutioner
exec
in class CudaExecutioner
protected CudaContext invoke(BroadcastOp op)
invoke
in class CudaExecutioner
protected CudaContext invoke(ScalarOp op)
invoke
in class CudaExecutioner
protected CudaContext invoke(TransformOp op)
invoke
in class CudaExecutioner
protected void prepareGrid(MetaOp op)
public void exec(MetaOp op)
exec
in interface OpExecutioner
exec
in class DefaultOpExecutioner
public void exec(GridOp op)
exec
in interface OpExecutioner
exec
in class DefaultOpExecutioner
protected void purgeQueue()
public void flushQueue()
flushQueue
in interface GridExecutioner
public void flushQueueBlocking()
flushQueueBlocking
in interface GridExecutioner
public INDArray exec(RandomOp op)
exec
in interface OpExecutioner
exec
in class CudaExecutioner
op
- public void exec(List<Aggregate> batch)
exec
in interface OpExecutioner
exec
in class CudaExecutioner
public void exec(Aggregate op)
exec
in interface OpExecutioner
exec
in class CudaExecutioner
public void aggregate(Aggregate op)
aggregate
in interface GridExecutioner
op
- public void aggregate(Aggregate op, long key)
aggregate
in interface GridExecutioner
op
- key
- public INDArray exec(RandomOp op, Random rng)
exec
in interface OpExecutioner
exec
in class CudaExecutioner
protected void buildAggregation()
Copyright © 2016. All Rights Reserved.