Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Commit 2eefb13

Browse files
committed
make pp tp visible in interface
1 parent 78debce commit 2eefb13

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

dist_run.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ def _init_distributed():
6969
return rank, world_size
7070

7171

72-
def _create_device_mesh(mesh_dimensions):
73-
return dist.init_device_mesh("cuda", mesh_dimensions, mesh_dim_names=("pp", "tp"))
72+
def _create_device_mesh(pp_degree, tp_degree):
73+
return dist.init_device_mesh("cuda", (pp_degree, tp_degree), mesh_dim_names=("pp", "tp"))
7474

7575

7676
def dict_to_args(dictionary: Dict[str, Any]) -> SimpleNamespace:
@@ -343,8 +343,7 @@ def main(args):
343343
tp_degree = world_size // pp_degree
344344

345345
# Create device mesh
346-
mesh_dimensions = (pp_degree, tp_degree)
347-
device_mesh = _create_device_mesh(mesh_dimensions)
346+
device_mesh = _create_device_mesh(pp_degree, tp_degree)
348347
tp_mesh = device_mesh["tp"]
349348
pp_mesh = device_mesh["pp"]
350349
logger.info(f"Created device mesh: {device_mesh}\n{tp_mesh=}, {pp_mesh=}")

0 commit comments

Comments
 (0)