mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-07-07 12:31:48 +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):
|
def rank0_print(msg):
|
||||||
|
if dist.is_initialized():
|
||||||
if dist.get_rank() == 0:
|
if dist.get_rank() == 0:
|
||||||
print(msg)
|
print(msg)
|
||||||
|
else:
|
||||||
|
print(msg)
|
||||||
|
Loading…
Reference in New Issue
Block a user