torch.xpu.memory.memory_stats
"reserved_bytes.{all,large_pool,small_pool}.{current,peak,allocated,freed}"
"active_bytes.{all,large_pool,small_pool}.{current,peak,allocated,freed}":
amount of active memory.
"requested_bytes.{all,large_pool,small_pool}.{current,peak,allocated,freed}":
memory requested by client code, compare this with allocated_bytes to check if
allocation rounding adds too much overhead.
For these core statistics, values are broken down as follows.
all: combined statistics across all memory pools.
large_pool: statistics for the large allocation pool (for size >= 1MB allocations).
small_pool: statistics for the small allocation pool (for size < 1MB allocations).
current: current value of this metric.
peak: maximum value of this metric.
allocated: historical total increase in this metric.
freed: historical total decrease in this metric.