mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-07-06 03:56:45 +00:00
fix: allow for print for fns that are used in both dist and single
This commit is contained in:
parent
7832707c37
commit
586a8abc06
@ -2,5 +2,8 @@ import torch.distributed as dist
|
||||
|
||||
|
||||
def rank0_print(msg):
|
||||
if dist.get_rank() == 0:
|
||||
if dist.is_initialized():
|
||||
if dist.get_rank() == 0:
|
||||
print(msg)
|
||||
else:
|
||||
print(msg)
|
||||
|
Loading…
Reference in New Issue
Block a user