torch.cuda.memory_stats
torch.cuda.memory_stats(device=None)
Returns a dictionary of CUDA memory allocator statistics for a
   given device.
The return value of this function is a dictionary of statistics,
   each of which is a non-negative integer.
Core statistics:


""allocated.{all,large_pool,small_pool}.{current,peak,allocated,
     freed}"": number of allocation requests received by the memory
     allocator.


""allocated_bytes.{all,large_pool,small_pool}.{current,peak,allo
     cated,freed}"": amount of allocated memory.


""segment.{all,large_pool,small_pool}.{current,peak,allocated,fr
     eed}"": number of reserved segments from "cudaMalloc()".


""reserved_bytes.{all,large_pool,small_pool}.{current,peak,alloc
     ated,freed}"": amount of reserved memory.


""active.{all,large_pool,small_pool}.{current,peak,allocated,fre
     ed}"": number of active memory blocks.


""active_bytes.{all,large_pool,small_pool}.{current,peak,allocat

