Shortcuts

torch.mps.current_allocated_memory

torch.mps.current_allocated_memory()[source]

Returns the current GPU memory occupied by tensors in bytes.

Note

The returned size does not include cached allocations in memory pools of MPSAllocator.

Return type:

int

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources