but what’s the point of keeping “CopyBackward” in the shm.grad_fn if I alr do an in-place copy operation? because even if I perform any backprop using the shm tensor, it shouldn’t affect the old tensor at all right – and hence I think the old “CopyBackward” should be useless and hence be collected by the gc?
wouldn’t the version field inside the shm tensor be sufficient to detect and throw an error if I try to backprop against something produced by an outdated tensor (e.g. altered with an in-place op)?