[DDP logging] Prefer use of c10::Join (#54649)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/54649
Some operator<< code manually implemented string join in C++, turns
out there is a c10 util for this. Use the util instead of rolling our own.
ghstack-source-id: 124840043
Test Plan: Ci
Reviewed By: SciPioneer
Differential Revision: D27316705
fbshipit-source-id: 5118097f84be2f38a503d8f81faa38c8d95ec17a