Hi,
The difference I see between 1 and 2 is that you create much more intermediary Tensors (when doing the deepcopy).
So I guess that the allocator you’re using is not returning this memory to the operating system to speed up following allocations? Maybe you want to try a different one?