[Misc][V1] Misc code streamlining (#15723)

Signed-off-by: Nick Hill <nhill@redhat.com>
This commit is contained in:
Nick Hill
2025-03-28 20:59:47 -07:00
committed by GitHub
parent 762b424a52
commit 6d531ad7b8
5 changed files with 32 additions and 38 deletions

View File

@@ -207,10 +207,7 @@ class StatelessProcessGroup:
def barrier(self):
"""A barrier to synchronize all ranks."""
for i in range(self.world_size):
if i == self.rank:
self.broadcast_obj(None, src=self.rank)
else:
self.broadcast_obj(None, src=i)
self.broadcast_obj(None, src=i)
@staticmethod
def create(