Skip to content

Commit

Permalink
remove ring optimization when not enable
Browse files Browse the repository at this point in the history
  • Loading branch information
samsja committed Nov 18, 2024
1 parent 89e7eeb commit cc36033
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/zeroband/comms.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,13 @@ def __init__(
self.cpu_local_mesh = init_device_mesh("cpu", mesh_shape=(self.local_pg.size(),))

# Logging
self._optimize_ring_ranks()
if self.live_recovery_rank_src is not None:
self.live_recovery.ask_for_live_ckpt(self.live_recovery_rank_src)
self.global_pg.barrier().wait()
if self.enable:
self._optimize_ring_ranks()
if self.live_recovery_rank_src is not None:
self.live_recovery.ask_for_live_ckpt(self.live_recovery_rank_src)
self.global_pg.barrier().wait()

self._logger.info(f"global_pg size : {self.global_pg.size()}, local_pg size: {self.local_pg.size()}")
self._logger.info(f"global_pg size : {self.global_pg.size()}, local_pg size: {self.local_pg.size()}")

def __del__(self):
self._stop_heartbeat()
Expand Down

0 comments on commit cc36033

Please sign in to comment.