Sherine_Brahma:

However, I am fairly confident that after taking this variable back to CPU as shown above, it really solves the problem (or workarounds)


This would mean that you would only free the GPU memory used by all tensors stored in toep, no?
Could you check the allocated memory before and after pushing these tensors to the CPU and compare it to the expected memory release?
If it fits the tensor shapes, I don’t see any unexpected issues.