MCPcopy
hub / github.com/EleutherAI/gpt-neox / print_rank_0

Function print_rank_0

megatron/__init__.py:17–23  ·  view source on GitHub ↗

If distributed is initialized print only on rank 0.

(*message)

Source from the content-addressed store, hash-verified

15
16
17def print_rank_0(*message):
18 """If distributed is initialized print only on rank 0."""
19 if torch.distributed.is_initialized():
20 if torch.distributed.get_rank() == 0:
21 print(*message, flush=True)
22 else:
23 print(*message, flush=True)
24
25
26from .initialize import initialize_megatron

Callers 15

training_logFunction · 0.90
load_checkpointFunction · 0.90
report_memoryFunction · 0.90
mup_coord_checkFunction · 0.90
pretrainFunction · 0.90
get_modelFunction · 0.90
get_optimizerFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected