[MPS] Handle reduction of scalars in edge-cases (#83743)
The issue was found as part of fixing Test consistency issues.
Test case coming up.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/83743
Approved by: https://github.com/razarmehr, https://github.com/malfet