[GPU] Calculate strides for metal tensors (#50309)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/50309
Previously, in order to unblock the dogfooding, we did some hacks to calculate the strides for the output tensor. Now it's time to fix that.
ghstack-source-id: 119673688
Test Plan:
1. Sandcastle CI
2. Person segmentation results
Reviewed By: AshkanAliabadi
Differential Revision: D25821766
fbshipit-source-id: 8c067f55a232b7f102a64b9035ef54c72ebab4d4