[RELAND] Deduplicate shared params before constructing Reducer in DDP (#53279)
Summary:
Original PR https://github.com/pytorch/pytorch/pull/51929 seemed to trigger failures in `pytorch_linux_xenial_py3_clang5_asan_test2`. Resubmitting to figure out why, and hopefully reland.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/53279
Reviewed By: mrshenli
Differential Revision: D26916701
Pulled By: zhaojuanmao
fbshipit-source-id: 75c74c8ad8ad24154eb59eddb2b222da0a09897e