torch.accelerator.memory.empty_cache
-
torch.accelerator.memory.empty_cache()[source] -
Release all unoccupied cached memory currently held by the caching allocator so that those can be used in other application.
Note
This function is a no-op if the memory allocator for the current accelerator has not been initialized.