Question About Pytorch Tensor Behaviour On GPU On Apple M1 Pro Chip

If I a modify A Pytorch tensor on GPU(M1 Pro) , and store in the same variable as before, then there will be two copies of tensor, the original one and the modified one or just the modified one on THE GPU . For Example Y is a Pytorch tensor on Gpu, I modified it and store again in Y only.

The What will be the behaviour of Pytorch Tensor?

Reason Behind Asking The Question:
Limited Resources (GPU And RAM).