PyTorch 2 · Performance
Check GPU memory
Print how much GPU memory tensors use.
torch.cuda.memory_allocated() / 1e9
Official PyTorch 2 documentation
PyTorch 2 · Performance
Print how much GPU memory tensors use.
torch.cuda.memory_allocated() / 1e9
Official PyTorch 2 documentation
Was this page helpful?