Skip to content

Commit 57fd859

Browse files
committed
Check dist.is_initialized
1 parent 41b1662 commit 57fd859

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

aiu_fms_testing_utils/scripts/drive_paged_programs.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1397,8 +1397,10 @@ def main() -> None:
13971397
distributed_kwargs: Dict[str, Any] = _get_distributed_kwargs(
13981398
is_distributed=args.distributed, dist_timeout=args.dist_timeout
13991399
)
1400+
# Only rank0 does the "save" ==> Set bool=1. All other ranks get bool=0.
1401+
# In case of single AIU ==> Only rank0 exists ==> Set bool=1 for rank0.
14001402
args.save_validation_info_outputs = args.save_validation_info_outputs and (
1401-
dist.get_rank() == 0
1403+
dist.get_rank() == 0 if dist.is_initialized() else 1
14021404
)
14031405
model_config: DPPRunnerConfig = DPPRunnerConfig()
14041406
world_size = (

0 commit comments

Comments
 (0)