mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-09-02 09:06:03 +00:00
fix: allow for print for fns that are used in both dist and single
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user