Skip to content

Commit 18f4230

Browse files
committed
Reinstate local_size in aiu_setup (for future use)
Signed-off-by: Andrea Fasoli <andrea.fasoli@ibm.com>
1 parent 0cd0d7b commit 18f4230

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

aiu_fms_testing_utils/utils/aiu_setup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def dprint(text):
2323
# ==============================================================
2424
# Common setup
2525
# ==============================================================
26-
def aiu_setup(rank=0, world_size=1, local_rank=0, verbose=False):
26+
def aiu_setup(rank=0, world_size=1, local_rank=0, local_size=1, verbose=False):
2727
# -------------
2828
# Envar setup for Sentient backend
2929
# -------------
@@ -56,9 +56,11 @@ def aiu_setup(rank=0, world_size=1, local_rank=0, verbose=False):
5656
# ==============================================================
5757
# Distributed setup
5858
# ==============================================================
59-
def aiu_dist_setup(rank, world_size, local_rank=-0, verbose=False):
59+
def aiu_dist_setup(rank, world_size, local_rank=-0, local_size=-1, verbose=False):
6060
if local_rank < 0:
6161
local_rank = rank
62+
if local_size < 0:
63+
local_size = world_size
6264

6365
if os.getenv("TORCHELASTIC_RUN_ID") is None:
6466
os.environ["MASTER_ADDR"] = "localhost"

0 commit comments

Comments
 (0)