torch.memory.MemoryStats
export interface MemoryStats {
/** Bytes currently in use by active tensors */
activeBytes: number;
/** Bytes held in the buffer pool for reuse */
pooledBytes: number;
/** Peak memory usage since last reset */
peakBytes: number;
/** Total number of buffer allocations */
allocations: number;
/** Current scope depth */
scopeDepth: number;
/** Whether finalization is enabled */
finalizationEnabled: boolean;
}activeBytes(number)- – Bytes currently in use by active tensors
pooledBytes(number)- – Bytes held in the buffer pool for reuse
peakBytes(number)- – Peak memory usage since last reset
allocations(number)- – Total number of buffer allocations
scopeDepth(number)- – Current scope depth
finalizationEnabled(boolean)- – Whether finalization is enabled