Shortcuts

torch.xpu.empty_cache

torch.xpu.empty_cache()[source]

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

Note

empty_cache() doesn’t increase the amount of XPU memory available for PyTorch. However, it may help reduce fragmentation of XPU memory in certain cases.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources