avoid re-allocation of view_shape for every tensor in `torch.meshgrid` (#62908)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/62908
Reviewed By: mruberry
Differential Revision: D31064165
Pulled By: dagitses
fbshipit-source-id: 3ddc3088e70fc8ef6dcf56ceb67fd20991169af1