public interface OpExecutioner
Modifier and Type | Interface and Description |
---|---|
static class |
OpExecutioner.ExecutionerType |
static class |
OpExecutioner.ProfilingMode |
Modifier and Type | Method and Description |
---|---|
INDArray[] |
allocateOutputArrays(CustomOp op)
Equivalent to calli
|
INDArray |
bitmapDecode(INDArray encoded,
INDArray target) |
INDArray |
bitmapEncode(INDArray indArray,
double threshold) |
long |
bitmapEncode(INDArray indArray,
INDArray target,
double threshold)
This method returns number of elements affected by encoder
|
OpContext |
buildContext()
This method returns OpContext which can be used (and reused) to execute custom ops
|
List<LongShapeDescriptor> |
calculateOutputShape(CustomOp op) |
void |
commit()
This method ensures all operations that supposed to be executed at this moment, are executed and finished.
|
DataBuffer |
createConstantBuffer(double[] values,
DataType desiredType) |
DataBuffer |
createConstantBuffer(float[] values,
DataType desiredType) |
DataBuffer |
createConstantBuffer(int[] values,
DataType desiredType) |
DataBuffer |
createConstantBuffer(long[] values,
DataType desiredType)
This method returns constant buffer for the given jvm array
|
DataBuffer |
createShapeInfo(long[] shape,
long[] stride,
long elementWiseStride,
char order,
DataType dtype,
boolean empty)
This method returns shapeInfo DataBuffer
|
void |
enableDebugMode(boolean reallyEnable) |
void |
enableVerboseMode(boolean reallyEnable) |
void |
exec(Aggregate op) |
<T extends Aggregate> |
exec(Batch<T> batch)
This method executes previously built batch
|
INDArray |
exec(BroadcastOp broadcast)
Execute a broadcast op, possibly along one or more dimensions
|
INDArray[] |
exec(CustomOp op) |
INDArray[] |
exec(CustomOp op,
OpContext context)
This method executes op with given context
|
void |
exec(GridOp op)
Execute GridOp
|
INDArray |
exec(IndexAccumulation indexAccum)
Execute an index accumulation along one or more dimensions
|
void |
exec(List<Aggregate> batch)
This method takes arbitrary sized list of aggregates,
and packs them into batches
|
void |
exec(MetaOp op)
Execute MetaOp
|
INDArray |
exec(Op op)
Execute the operation
|
INDArray |
exec(RandomOp op)
This method executes specified RandomOp using default RNG available via Nd4j.getRandom()
|
INDArray |
exec(RandomOp op,
Random rng)
This method executes specific RandomOp against specified RNG
|
INDArray |
exec(ReduceOp reduceOp)
Execute a reduceOp, possibly along one or more dimensions
|
INDArray |
exec(ScalarOp broadcast)
Execute ScalarOp
|
INDArray |
exec(Variance accumulation)
Execute an variance accumulation op, possibly along one or more dimensions
|
BroadcastOp |
execAndReturn(BroadcastOp op)
Execute and return the result from a vector op
|
CustomOp |
execAndReturn(CustomOp op)
This method executes given CustomOp
PLEASE NOTE: You're responsible for input/output validation
|
IndexAccumulation |
execAndReturn(IndexAccumulation op)
Execute and return the result from an index accumulation
|
Op |
execAndReturn(Op op)
Execute and return a result
ndarray from the given op
|
ReduceOp |
execAndReturn(ReduceOp op)
Execute and return the result from an accumulation
|
ScalarOp |
execAndReturn(ScalarOp op)
Execute and return the result from a scalar op
|
TransformOp |
execAndReturn(TransformOp op)
Execute a TransformOp and return the result
|
Variance |
execAndReturn(Variance op)
Execute and return the result from an accumulation
|
Map<String,INDArray> |
executeGraph(long id,
Map<String,INDArray> map,
Map<String,Integer> reverseMap) |
void |
forgetGraph(long id) |
Map<String,CustomOpDescriptor> |
getCustomOperations()
This method returns names of all custom operations available in current backend, and their number of input/output arguments
|
Properties |
getEnvironmentInformation()
This method return set of key/value and
key/key/value objects,
describing current environment
|
String |
getLastOp()
This method returns opName of the last invoked op
|
OpExecutioner.ProfilingMode |
getProfilingMode()
Deprecated.
|
String |
getString(Utf8Buffer buffer,
long index)
This method extracts String from Utf8Buffer
|
TADManager |
getTADManager()
This method returns TADManager instance used for this OpExecutioner
|
INDArrayStatistics |
inspectArray(INDArray array) |
boolean |
isDebug()
This method returns true if debug mode is enabled, false otherwise
|
boolean |
isExperimentalMode() |
boolean |
isVerbose()
This method returns true if verbose mode is enabled, false otherwise
|
void |
printEnvironmentInformation()
This method prints out environmental information returned by getEnvironmentInformation() method
|
void |
push()
This method ensures all operations that supposed to be executed at this moment, are executed.
|
void |
registerGraph(long id,
org.bytedeco.javacpp.Pointer graph) |
String |
runFullBenchmarkSuit(boolean printOut) |
String |
runLightBenchmarkSuit(boolean printOut) |
void |
scatterUpdate(ScatterUpdate.UpdateOp op,
INDArray array,
INDArray indices,
INDArray updates,
int[] axis)
Deprecated.
|
void |
setElementsThreshold(int threshold)
This method allows to set desired number of elements per thread, for performance optimization purposes.
|
void |
setProfilingConfig(ProfilerConfig config)
This method stores specified configuration.
|
void |
setProfilingMode(OpExecutioner.ProfilingMode mode)
Deprecated.
|
void |
setTadThreshold(int threshold)
This method allows to set desired number of sub-arrays per thread, for performance optimization purposes.
|
TadPack |
tadShapeInfoAndOffsets(INDArray array,
int[] dimension)
This method returns host/device tad buffers
|
INDArray |
thresholdDecode(INDArray encoded,
INDArray target)
This method decodes thresholds array, and puts it into target array
|
INDArray |
thresholdEncode(INDArray input,
double threshold)
This method encodes array as thresholds, updating input array at the same time
|
INDArray |
thresholdEncode(INDArray input,
double threshold,
Integer boundary)
This method encodes array as thresholds, updating input array at the same time
|
OpExecutioner.ExecutionerType |
type()
This method returns type for this executioner instance
|
boolean isVerbose()
boolean isDebug()
OpExecutioner.ExecutionerType type()
String getLastOp()
TransformOp execAndReturn(TransformOp op)
op
- the operation to executeReduceOp execAndReturn(ReduceOp op)
op
- the operation to executeVariance execAndReturn(Variance op)
op
- the operation to executeIndexAccumulation execAndReturn(IndexAccumulation op)
op
- the index accumulation operation to executeScalarOp execAndReturn(ScalarOp op)
op
- the operation to executeBroadcastOp execAndReturn(BroadcastOp op)
op
- INDArray exec(ReduceOp reduceOp)
reduceOp
- the reduceOpINDArray exec(BroadcastOp broadcast)
broadcast
- the accumulationINDArray exec(Variance accumulation)
accumulation
- the accumulationINDArray exec(IndexAccumulation indexAccum)
indexAccum
- the index accumulation operationOp execAndReturn(Op op)
op
- the operation to executevoid exec(MetaOp op)
op
- void exec(GridOp op)
op
- void exec(Aggregate op)
op
- <T extends Aggregate> void exec(Batch<T> batch)
batch
- void exec(List<Aggregate> batch)
batch
- INDArray exec(RandomOp op)
op
- INDArray exec(RandomOp op, Random rng)
op
- rng
- Properties getEnvironmentInformation()
@Deprecated void setProfilingMode(OpExecutioner.ProfilingMode mode)
mode
- void setProfilingConfig(ProfilerConfig config)
config
- @Deprecated OpExecutioner.ProfilingMode getProfilingMode()
TADManager getTADManager()
void printEnvironmentInformation()
void push()
void commit()
INDArray thresholdEncode(INDArray input, double threshold)
input
- INDArray thresholdEncode(INDArray input, double threshold, Integer boundary)
input
- INDArray thresholdDecode(INDArray encoded, INDArray target)
encoded
- target
- long bitmapEncode(INDArray indArray, INDArray target, double threshold)
indArray
- target
- threshold
- INDArray bitmapEncode(INDArray indArray, double threshold)
indArray
- threshold
- INDArray bitmapDecode(INDArray encoded, INDArray target)
encoded
- target
- Map<String,CustomOpDescriptor> getCustomOperations()
CustomOp execAndReturn(CustomOp op)
op
- INDArray[] exec(CustomOp op, OpContext context)
op
- context
- List<LongShapeDescriptor> calculateOutputShape(CustomOp op)
void enableDebugMode(boolean reallyEnable)
void enableVerboseMode(boolean reallyEnable)
boolean isExperimentalMode()
void registerGraph(long id, org.bytedeco.javacpp.Pointer graph)
Map<String,INDArray> executeGraph(long id, Map<String,INDArray> map, Map<String,Integer> reverseMap)
void forgetGraph(long id)
void setElementsThreshold(int threshold)
threshold
- void setTadThreshold(int threshold)
threshold
- String getString(Utf8Buffer buffer, long index)
buffer
- index
- @Deprecated void scatterUpdate(ScatterUpdate.UpdateOp op, @NonNull INDArray array, @NonNull INDArray indices, @NonNull INDArray updates, int[] axis)
op
- array
- indices
- updates
- axis
- OpContext buildContext()
INDArrayStatistics inspectArray(INDArray array)
array
- DataBuffer createShapeInfo(long[] shape, long[] stride, long elementWiseStride, char order, DataType dtype, boolean empty)
shape
- stride
- elementWiseStride
- order
- dtype
- TadPack tadShapeInfoAndOffsets(INDArray array, int[] dimension)
DataBuffer createConstantBuffer(long[] values, DataType desiredType)
values
- DataBuffer createConstantBuffer(int[] values, DataType desiredType)
DataBuffer createConstantBuffer(float[] values, DataType desiredType)
DataBuffer createConstantBuffer(double[] values, DataType desiredType)
String runLightBenchmarkSuit(boolean printOut)
String runFullBenchmarkSuit(boolean printOut)
Copyright © 2019. All rights reserved.