Output tensor specified via out= must be on the same device as inputs for dot & vdot (#56334)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/55561.
1. Added checks to ensure that Output tensor specified via out= must be on the same device as inputs for `dot` & `vdot`.
2. Unskipped `test_out` for `dot` & `vdot`.
3. Also changed the `tensordot` implementation to check if both input tensors are on the same device as the output tensor.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/56334
Reviewed By: H-Huang
Differential Revision: D27993778
Pulled By: mruberry
fbshipit-source-id: 36dee41ceef123c29d0cc52d6b09c3c440e8e60e