simplify initialize_torch_distributed()

This commit is contained in:
ur4t 2024-07-04 14:50:12 +08:00
parent 5ad41aa2a6
commit 9ea900de49

View File

@ -63,7 +63,7 @@ def initialize_torch_distributed():
if WORLD_SIZE == 1: if WORLD_SIZE == 1:
return FakeGroup(RANK, WORLD_SIZE), RANK, WORLD_SIZE return FakeGroup(RANK, WORLD_SIZE), RANK, WORLD_SIZE
else:
if os.getenv("DEBUG", None) == "1": if os.getenv("DEBUG", None) == "1":
return FakeGroup(RANK, WORLD_SIZE), RANK, WORLD_SIZE return FakeGroup(RANK, WORLD_SIZE), RANK, WORLD_SIZE