PyTorch 2 · Performance
Free cached GPU memory
Release unused cached memory back to the GPU.
torch.cuda.empty_cache()
Official PyTorch 2 documentation
PyTorch 2 · Performance
Release unused cached memory back to the GPU.
torch.cuda.empty_cache()
Official PyTorch 2 documentation
Was this page helpful?