[DCP] Automatically set `no_dist` if distributed is unavailable (#119813)
[DCP] Automatically set `no_dist` if distributed is unavailable
Differential Revision: [D53718043](https://our.internmc.facebook.com/intern/diff/D53718043/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/119813
Approved by: https://github.com/fegin, https://github.com/wz337