W3cubDocs

/PyTorch 2.9

torch.xpu.memory.memory_stats_as_nested_dict

torch.xpu.memory.memory_stats_as_nested_dict(device=None) [source]

Return the result of memory_stats() as a nested dictionary.

Return type

dict[str, Any]

© 2025, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://docs.pytorch.org/docs/2.9/generated/torch.xpu.memory.memory_stats_as_nested_dict.html