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 interfaceOpProfiler.OpProfilerListenerstatic classOpProfiler.PenaltyCause
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddListener(OpProfiler.OpProfilerListener listener)dd the listener to the profilervoidclearListener(OpProfiler.OpProfilerListener listener)Clear the listener from the profilerstatic OpProfilergetInstance()longgetInvocationsCount()protected StackAggregatorgetMixedOrderAggregator()Dev-time method.protected StringgetOpClass(CustomOp op)protected StringgetOpClass(Op op)This method returns op class opNameStackAggregatorgetScalarAggregator()protected OpProfiler.PenaltyCause[]joinDistinct(OpProfiler.PenaltyCause[] a, OpProfiler.PenaltyCause[] b)voidprintOutDashboard()This method prints out dashboard statevoidprocessBlasCall(boolean isGemm, INDArray... operands)voidprocessBlasCall(String blasOpName)Deprecated.voidprocessMemoryAccess()voidprocessOpCall(CustomOp op)This method tracks op callsvoidprocessOpCall(Op op)This method tracks op callsvoidprocessOpCall(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)StringprocessOrders(INDArray... operands)voidprocessScalarCall()This method tracks INDArray.putScalar()/getScalar() callsvoidprocessStackCall(CustomOp op, long timeStart)voidprocessStackCall(Op op, long timeStart)This method buildsOpProfiler.PenaltyCause[]processTADOperands(DataBuffer... tadBuffers)voidreset()This method resets all countersvoidtimeBlasCall()voidtimeOpCall(CustomOp op, long startTime)voidtimeOpCall(Op op, long startTime)protected voidupdatePairs(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()
-
-