fix barrier in jit test (#34901)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/34901
init_pg is needed for dist.barrier call, otherwise default process group may not be found for some rpc backend
ghstack-source-id: 100319642
Test Plan: unit test
Differential Revision: D20495321
fbshipit-source-id: a44241bd2ff6e1404eee9b241270a94e9fd114d0