[SPMD] Upstream partial_lower (#99069)
Several ops cannot be lowered to the Inductor. This PR copies the internal implementation of partial_lower (credit to @yifuwang ) to torch.distributed._spmd to unblock the OSS usage. The internal version will be kept until it is mature and will replace this version.
Differential Revision: [D44970278](https://our.internmc.facebook.com/intern/diff/D44970278/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/99069
Approved by: https://github.com/mrshenli, https://github.com/lessw2020