Package org.apache.sysds.utils

## Class GPUStatistics

- java.lang.Object
- - org.apache.sysds.utils.GPUStatistics

    public class GPUStatistics
    extends Object

Measures performance numbers when GPU mode is enabled Printed as part of `Statistics`.

### Field Summary

Fields
`static LongAdder` `cudaAllocCount`
`static LongAdder` `cudaAllocFailedCount`
`static LongAdder` `cudaAllocFailedTime`
`static LongAdder` `cudaAllocReuseCount`
`static LongAdder` `cudaAllocSuccessCount`
`static LongAdder` `cudaAllocSuccessTime`
`static LongAdder` `cudaAllocTime`
`static LongAdder` `cudaDeAllocCount`
`static LongAdder` `cudaDeAllocTime`
`static LongAdder` `cudaDenseToSparseCount`
`static LongAdder` `cudaDenseToSparseTime`
`static LongAdder` `cudaDouble2FloatCount`
`static LongAdder` `cudaDouble2FloatTime`
`static LongAdder` `cudaEvictCount`
`static LongAdder` `cudaEvictMemcpyTime`
`static LongAdder` `cudaEvictSizeCount`
`static LongAdder` `cudaEvictSizeTime`
`static LongAdder` `cudaEvictTime`
`static LongAdder` `cudaFloat2DoubleCount`
`static LongAdder` `cudaFloat2DoubleTime`
`static LongAdder` `cudaForcedClearLazyFreedEvictTime`
`static LongAdder` `cudaForcedClearUnpinnedEvictTime`
`static LongAdder` `cudaFromDevCount`
`static LongAdder` `cudaFromDevTime`
`static LongAdder` `cudaFromDevToShadowCount`
`static LongAdder` `cudaFromDevToShadowTime`
`static LongAdder` `cudaFromShadowToDevCount`
`static LongAdder` `cudaFromShadowToDevTime`
`static LongAdder` `cudaFromShadowToHostCount`
`static LongAdder` `cudaFromShadowToHostTime`
`static long` `cudaInitTime`
`static long` `cudaLibrariesInitTime`
`static LongAdder` `cudaMemSet0Count`
`static LongAdder` `cudaMemSet0Time`
`static LongAdder` `cudaSparseConversionCount`
`static LongAdder` `cudaSparseConversionTime`
`static LongAdder` `cudaSparseToDenseCount`
`static LongAdder` `cudaSparseToDenseTime`
`static LongAdder` `cudaToDevCount`
`static LongAdder` `cudaToDevTime`

### Constructor Summary

Constructors
`GPUStatistics()`

### Method Summary

All Methods Static Methods Concrete Methods
`static int` `getNoOfExecutedGPUInst()`
`static String` `getStringForCPMiscTimesPerInstruction​(String instructionName)` Used to print misc timers (and their counts) for a given instruction/op
`static String` `getStringForCudaTimers()` Used to print out cuda timers & counters
`static void` `incrementNoOfExecutedGPUInst()`
`static void` `reset()` Resets all the cuda counters and timers, including the misc timers & counters
`static void` `resetMiscTimers()` Resets the miscellaneous timers & counters
`static void` `setNoOfExecutedGPUInst​(int numJobs)`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### cudaInitTime

    public static long cudaInitTime

#### cudaLibrariesInitTime

    public static long cudaLibrariesInitTime

#### cudaSparseToDenseTime

    public static LongAdder cudaSparseToDenseTime

#### cudaDenseToSparseTime

    public static LongAdder cudaDenseToSparseTime

#### cudaSparseConversionTime

    public static LongAdder cudaSparseConversionTime

#### cudaSparseToDenseCount

    public static LongAdder cudaSparseToDenseCount

#### cudaDenseToSparseCount

    public static LongAdder cudaDenseToSparseCount

#### cudaSparseConversionCount

    public static LongAdder cudaSparseConversionCount

#### cudaAllocTime

    public static LongAdder cudaAllocTime

#### cudaAllocSuccessTime

    public static LongAdder cudaAllocSuccessTime

#### cudaAllocFailedTime

    public static LongAdder cudaAllocFailedTime

#### cudaDeAllocTime

    public static LongAdder cudaDeAllocTime

#### cudaMemSet0Time

    public static LongAdder cudaMemSet0Time

#### cudaToDevTime

    public static LongAdder cudaToDevTime

#### cudaFromDevTime

    public static LongAdder cudaFromDevTime

#### cudaFromShadowToHostTime

    public static LongAdder cudaFromShadowToHostTime

#### cudaFromShadowToDevTime

    public static LongAdder cudaFromShadowToDevTime

#### cudaFromDevToShadowTime

    public static LongAdder cudaFromDevToShadowTime

#### cudaEvictTime

    public static LongAdder cudaEvictTime

#### cudaEvictSizeTime

    public static LongAdder cudaEvictSizeTime

#### cudaFloat2DoubleTime

    public static LongAdder cudaFloat2DoubleTime

#### cudaDouble2FloatTime

    public static LongAdder cudaDouble2FloatTime

#### cudaEvictMemcpyTime

    public static LongAdder cudaEvictMemcpyTime

#### cudaForcedClearLazyFreedEvictTime

    public static LongAdder cudaForcedClearLazyFreedEvictTime

#### cudaForcedClearUnpinnedEvictTime

    public static LongAdder cudaForcedClearUnpinnedEvictTime

#### cudaAllocCount

    public static LongAdder cudaAllocCount

#### cudaDeAllocCount

    public static LongAdder cudaDeAllocCount

#### cudaMemSet0Count

    public static LongAdder cudaMemSet0Count

#### cudaToDevCount

    public static LongAdder cudaToDevCount

#### cudaFromDevCount

    public static LongAdder cudaFromDevCount

#### cudaFromShadowToHostCount

    public static LongAdder cudaFromShadowToHostCount

#### cudaFromShadowToDevCount

    public static LongAdder cudaFromShadowToDevCount

#### cudaFromDevToShadowCount

    public static LongAdder cudaFromDevToShadowCount

#### cudaEvictCount

    public static LongAdder cudaEvictCount

#### cudaEvictSizeCount

    public static LongAdder cudaEvictSizeCount

#### cudaFloat2DoubleCount

    public static LongAdder cudaFloat2DoubleCount

#### cudaDouble2FloatCount

    public static LongAdder cudaDouble2FloatCount

#### cudaAllocSuccessCount

    public static LongAdder cudaAllocSuccessCount

#### cudaAllocFailedCount

    public static LongAdder cudaAllocFailedCount

#### cudaAllocReuseCount

    public static LongAdder cudaAllocReuseCount

### Constructor Detail

#### GPUStatistics

    public GPUStatistics()

### Method Detail

#### resetMiscTimers

    public static void resetMiscTimers()

Resets the miscellaneous timers & counters

#### reset

    public static void reset()

Resets all the cuda counters and timers, including the misc timers & counters

#### setNoOfExecutedGPUInst

    public static void setNoOfExecutedGPUInst​(int numJobs)

#### incrementNoOfExecutedGPUInst

    public static void incrementNoOfExecutedGPUInst()

#### getNoOfExecutedGPUInst

    public static int getNoOfExecutedGPUInst()

#### getStringForCPMiscTimesPerInstruction

    public static String getStringForCPMiscTimesPerInstruction​(String instructionName)

Used to print misc timers (and their counts) for a given instruction/op

Parameters:
  `instructionName` - name of the instruction/op
Returns:
  a formatted string of misc timers for a given instruction/op

#### getStringForCudaTimers

    public static String getStringForCudaTimers()

Used to print out cuda timers & counters

Returns:
  a formatted string of cuda timers & counters