[DDP][Tests] Fix weight sharing test (#74252)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/74252
Test wasn't actually doing weight sharing as pointed out by Andrew in https://github.com/pytorch/pytorch/pull/74130#discussion_r826954228
ghstack-source-id: 151429409
Test Plan: CI
Reviewed By: awgu
Differential Revision: D34904535
fbshipit-source-id: 62d1aa9d9fd618176ecd898ca9364a6fa478be6d
(cherry picked from commit 03e7b3bc7ec79fe838892a45ebebb77050b57d3a)