W3cubDocs

/PyTorch 2.9

torch.mtia.memory

Created On: Dec 09, 2024 | Last Updated On: Jul 28, 2025

The MTIA backend is implemented out of the tree, only interfaces are be defined here.

This package adds support for device memory management implemented in MTIA.

memory_stats

Return a dictionary of MTIA memory allocator statistics for a given device.

memory_allocated

Return the current MTIA memory occupied by tensors in bytes for a given device.

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