Rate this Page
★★★★★
torch.xpu.memory.empty_cache#
- torch.xpu.memory.empty_cache()[source]#
Release all unoccupied cached memory currently held by the cachingallocator so that those can be used in other XPU application.
Note
empty_cache()doesn’t increase the amount of XPUmemory available for PyTorch. However, it may help reduce fragmentationof XPU memory in certain cases.
On this page