How to delete PyTorch objects correctly from memory
I’m having an issue with properly deleting PyTorch objects from memory. With this Tensor: Then delete the object: CUDA memory is not freed up. Is there a clean way to delete a PyTorch object from CUDA memory?
111
Hi, It is because the cuda backend uses a caching allocator. This means that the memory is freed but not returned to the device.
albanD
Ah Thanks a lot! It’s really helpful!
111
nionjo
albanD
SANTOSH_S
Hi,
albanD