# tensorplay.cuda.memory_stats_as_nested_dict Source: https://www.tensorplay.cn/docs/generated/tensorplay.cuda.memory_stats_as_nested_dict.html ```python tensorplay.cuda.memory_stats_as_nested_dict(device: Any = None) → dict[str, Any] ``` Return the result of [memory_stats()](/docs/generated/tensorplay.cuda.memory_stats.html#tensorplay.cuda.memory_stats) as a nested dictionary. The native allocator reports the fragmentation-aware matrix directly (segments, free-block histogram, pending cross-stream blocks, graph pools, capture state); it is exposed under "allocator" alongside the