Hi,
Pytorch always uses the caching allocator, so the del should not have any big performance impact (but they are not really needed either so…).
Emptying the cache of the memory allocator will cause a barrier though, so that should be used with caution.