[MPS] Restride output strides to contiguous format for inverse op (#102122)
Remove unnecessary output allocation and reuse the current allocated output Tensor.
This change restrides the output strides to contiguous format for inverse op.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/102122
Approved by: https://github.com/kulinseth