Hello, thanks for the reply. There’s no particular grandiose reason, but I just wanted to try and make a project as memory-efficient as possible. I noticed that there were certain variables that were only used once and not used afterwards, and thought that freeing up the memory for those tensors would be good. I tried the del foo, but I also realized that this simply “frees” the memory and doesn’t return it to the device.
I was initially confused because I wasn’t aware of the difference between freeing memory and returning it to the device. Perhaps my knowledge is a bit short, but “freeing and not returning the device” is essentially allowing for more memory usage, right?