Skip to content

Commit eed48cb

Browse files
committed
sync point for distributed training only
1 parent 2c0b8d4 commit eed48cb

File tree

1 file changed

+2
-1
lines changed
  • src/provable_pruning/provable_pruning/util

1 file changed

+2
-1
lines changed

src/provable_pruning/provable_pruning/util/train.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,8 @@ def train_with_worker(
457457
)
458458

459459
# wait for all processes to load the checkpoint
460-
dist.barrier()
460+
if is_distributed:
461+
dist.barrier()
461462

462463
# this may be non-zero in the case of rewinding ...
463464
if not found_checkpoint:

0 commit comments

Comments
 (0)