torch.cuda.caching_allocator_delete β€” PyTorch 2.7 documentation (original) (raw)

torch.cuda.caching_allocator_delete(mem_ptr)[source][source]ΒΆ

Delete memory allocated using the CUDA memory allocator.

Memory allocated with caching_allocator_alloc(). is freed here. The associated device and stream are tracked inside the allocator.

Parameters

mem_ptr (int) – memory address to be freed by the allocator.