Hi,
I’m not a cpp specialist but the idea I keep in mind is the following: torch::Tensor can be seen as std::shared_ptr<TensorImpl>.
So doing auto foo = bar; will just bump the version counter in the TensorImpl and give you the exact same actual tensor.
And doing auto foo = std::move(bar); means that you steal the reference. So now foo still contains the same tensor , but the version counter bump did not happen and bar should not be used anymore.