Rate this Page

torch.accelerator.memory.empty_cache#

torch.accelerator.memory.empty_cache()[source]#

Release all unoccupied cached memory currently held by the cachingallocator so that those can be used in other application.

Note

This function is a no-op if the memory allocator for the currentaccelerator has not been initialized.