Optimizing GPU Memory Pools: Inside PyTorch's CUDA Caching Allocator
PyTorch’s CUDA caching allocator hides the cost of repeated allocations by recycling VRAM in fixed-size blocks. Here’s how it works, why it matters at scale, and how to squeeze more performance out of it.