[Gradient Compression] Directly let world_size = group_to_use.size() (#49715)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/49715
Address the comment on https://github.com/pytorch/pytorch/pull/49417#discussion_r545388351
ghstack-source-id: 119049598
Test Plan: waitforbuildbot
Reviewed By: rohan-varma
Differential Revision: D25673997
fbshipit-source-id: 44eb2540e5a77331c34ba503285cbd0bd63c2c0a