Package org.nd4j.linalg.profiler
Class OpProfiler
- java.lang.Object
-
- org.nd4j.linalg.profiler.OpProfiler
-
public class OpProfiler extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
OpProfiler.OpProfilerListener
static class
OpProfiler.PenaltyCause
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addListener(OpProfiler.OpProfilerListener listener)
dd the listener to the profilervoid
clearListener(OpProfiler.OpProfilerListener listener)
Clear the listener from the profilerstatic OpProfiler
getInstance()
long
getInvocationsCount()
protected StackAggregator
getMixedOrderAggregator()
Dev-time method.protected String
getOpClass(CustomOp op)
protected String
getOpClass(Op op)
This method returns op class opNameStackAggregator
getScalarAggregator()
protected OpProfiler.PenaltyCause[]
joinDistinct(OpProfiler.PenaltyCause[] a, OpProfiler.PenaltyCause[] b)
void
printOutDashboard()
This method prints out dashboard statevoid
processBlasCall(boolean isGemm, INDArray... operands)
void
processBlasCall(String blasOpName)
Deprecated.void
processMemoryAccess()
void
processOpCall(CustomOp op)
This method tracks op callsvoid
processOpCall(Op op)
This method tracks op callsvoid
processOpCall(Op op, DataBuffer... tadBuffers)
OpProfiler.PenaltyCause[]
processOperands(INDArray... operands)
This method checks for something somewhereOpProfiler.PenaltyCause[]
processOperands(INDArray x, INDArray y)
OpProfiler.PenaltyCause[]
processOperands(INDArray x, INDArray y, INDArray z)
String
processOrders(INDArray... operands)
void
processScalarCall()
This method tracks INDArray.putScalar()/getScalar() callsvoid
processStackCall(CustomOp op, long timeStart)
void
processStackCall(Op op, long timeStart)
This method buildsOpProfiler.PenaltyCause[]
processTADOperands(DataBuffer... tadBuffers)
void
reset()
This method resets all countersvoid
timeBlasCall()
void
timeOpCall(CustomOp op, long startTime)
void
timeOpCall(Op op, long startTime)
protected void
updatePairs(String opName, String opClass)
-
-
-
Method Detail
-
clearListener
public void clearListener(OpProfiler.OpProfilerListener listener)
Clear the listener from the profiler- Parameters:
listener
- the listener to clear
-
addListener
public void addListener(OpProfiler.OpProfilerListener listener)
dd the listener to the profiler- Parameters:
listener
- the listener to add
-
reset
public void reset()
This method resets all counters
-
getInstance
public static OpProfiler getInstance()
- Returns:
-
getOpClass
protected String getOpClass(Op op)
This method returns op class opName- Parameters:
op
-- Returns:
-
processScalarCall
public void processScalarCall()
This method tracks INDArray.putScalar()/getScalar() calls
-
processOpCall
public void processOpCall(Op op)
This method tracks op calls- Parameters:
op
-
-
processOpCall
public void processOpCall(CustomOp op)
This method tracks op calls- Parameters:
op
-
-
processOpCall
public void processOpCall(Op op, DataBuffer... tadBuffers)
- Parameters:
op
-tadBuffers
-
-
getMixedOrderAggregator
protected StackAggregator getMixedOrderAggregator()
Dev-time method.- Returns:
-
getScalarAggregator
public StackAggregator getScalarAggregator()
-
timeOpCall
public void timeOpCall(Op op, long startTime)
-
timeOpCall
public void timeOpCall(CustomOp op, long startTime)
-
processBlasCall
@Deprecated public void processBlasCall(String blasOpName)
Deprecated.This method tracks blasCalls
-
timeBlasCall
public void timeBlasCall()
-
printOutDashboard
public void printOutDashboard()
This method prints out dashboard state
-
getInvocationsCount
public long getInvocationsCount()
-
processStackCall
public void processStackCall(Op op, long timeStart)
This method builds- Parameters:
op
-
-
processStackCall
public void processStackCall(CustomOp op, long timeStart)
-
processBlasCall
public void processBlasCall(boolean isGemm, INDArray... operands)
-
processOperands
public OpProfiler.PenaltyCause[] processOperands(INDArray x, INDArray y)
-
processTADOperands
public OpProfiler.PenaltyCause[] processTADOperands(DataBuffer... tadBuffers)
-
processOperands
public OpProfiler.PenaltyCause[] processOperands(INDArray x, INDArray y, INDArray z)
-
joinDistinct
protected OpProfiler.PenaltyCause[] joinDistinct(OpProfiler.PenaltyCause[] a, OpProfiler.PenaltyCause[] b)
-
processOperands
public OpProfiler.PenaltyCause[] processOperands(INDArray... operands)
This method checks for something somewhere- Parameters:
operands
-
-
processMemoryAccess
public void processMemoryAccess()
-
-