Class PerformanceTracker
- java.lang.Object
-
- org.nd4j.linalg.api.ops.performance.PerformanceTracker
-
public class PerformanceTracker extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description longaddMemoryTransaction(int deviceId, long timeSpentNanos, long numberOfBytes)This method stores bandwidth used for given transaction.longaddMemoryTransaction(int deviceId, long timeSpentNanos, long numberOfBytes, @NonNull MemcpyDirection direction)This method stores bandwidth used for given transaction.voidclear()Map<Integer,Map<MemcpyDirection,Long>>getCurrentBandwidth()static PerformanceTrackergetInstance()voidhelperRegisterTransaction(int deviceId, long timeSpentNanos, long numberOfBytes, @NonNull MemcpyDirection direction)longhelperStartTransaction()
-
-
-
Method Detail
-
getInstance
public static PerformanceTracker getInstance()
-
addMemoryTransaction
public long addMemoryTransaction(int deviceId, long timeSpentNanos, long numberOfBytes)This method stores bandwidth used for given transaction. PLEASE NOTE: Bandwidth is stored in per millisecond value.- Parameters:
deviceId- device used for this transactiontimeSpent- time spent on this transaction in nanosecondsnumberOfBytes- number of bytes
-
addMemoryTransaction
public long addMemoryTransaction(int deviceId, long timeSpentNanos, long numberOfBytes, @NonNull @NonNull MemcpyDirection direction)This method stores bandwidth used for given transaction. PLEASE NOTE: Bandwidth is stored in per millisecond value.- Parameters:
deviceId- device used for this transactiontimeSpent- time spent on this transaction in nanosecondsnumberOfBytes- number of bytesdirection- direction for the given memory transaction
-
clear
public void clear()
-
helperStartTransaction
public long helperStartTransaction()
-
helperRegisterTransaction
public void helperRegisterTransaction(int deviceId, long timeSpentNanos, long numberOfBytes, @NonNull @NonNull MemcpyDirection direction)
-
getCurrentBandwidth
public Map<Integer,Map<MemcpyDirection,Long>> getCurrentBandwidth()
-
-