From 0e89ddd706d3d623bc1ad11cb9ccf58b93a0b3e5 Mon Sep 17 00:00:00 2001 From: Haofan Wang Date: Mon, 9 Jan 2023 18:25:27 +0800 Subject: [PATCH] Update parallel_context.py --- colossalai/context/parallel_context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/colossalai/context/parallel_context.py b/colossalai/context/parallel_context.py index dd12dad6d347..b7338b53ddde 100644 --- a/colossalai/context/parallel_context.py +++ b/colossalai/context/parallel_context.py @@ -375,7 +375,7 @@ def init_global_dist(self, rank: int, world_size: int, backend: str, host: str, # None will give the default global process group for pytorch dist operations ranks = list(range(world_size)) - cpu_group = dist.new_group(ranks, backend='gloo') if dist.get_backend() != 'gloo' else None + cpu_group = dist.new_group(ranks, backend='gloo') if dist.get_backend() == 'gloo' else None self._register_dist(rank, world_size, dist.GroupMember.WORLD, cpu_group, ranks, ParallelMode.GLOBAL) self.add_global_rank(ParallelMode.GLOBAL, rank)