[Reducer] small fix (#74127)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/74127
getRank() is now public.
ghstack-source-id: 151319258
Test Plan: CI
Reviewed By: zhaojuanmao
Differential Revision: D34833222
fbshipit-source-id: a846509e2d61dd9208706d471c7c83819ce24922
(cherry picked from commit 119974af5a0eb9805386f5026a1a2d14d2ffc13e)