Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions scripts/performance/perf_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ class PerfEnvPlugin(Plugin):
cp_size: int = 1
pp_size: int = 1
script_args_converter_fn: Optional[Callable[[PerfEnvPluginScriptArgs], List[str]]] = None
num_gpus: int = 8
moe_a2a_overlap: bool = False
model_name: str
model_size: str
Expand All @@ -207,26 +206,21 @@ def _set_num_cuda_device_max_connections(
self,
task: Union["run.Partial", "run.Script"],
executor: "run.Executor",
num_gpus: int,
tp_size: int,
cp_size: int,
pp_size: int,
moe_a2a_overlap: bool,
enable_deepep: bool,
gpu_sm100_or_newer: bool,
):
dp_size = num_gpus // (tp_size * cp_size * pp_size)

cuda_device_max_connections = 8
if enable_deepep:
cuda_device_max_connections = 32
if gpu_sm100_or_newer:
if (tp_size > 1 or cp_size > 1) and (dp_size > 1 or pp_size > 1):
"""
We need extra connections to avoid serialization of streams, so we use max connections of 32 instead
of the default device connection of 8.
"""
cuda_device_max_connections = 32
"""
We need extra connections to avoid serialization of streams, so we use max connections of 32 instead
of the default device connection of 8.
"""
cuda_device_max_connections = 32
else:
# Hopper or earlier generation GPUs
if (tp_size > 1 or cp_size > 1) and not moe_a2a_overlap:
Expand Down Expand Up @@ -370,10 +364,8 @@ def setup(self, task: Union["run.Partial", "run.Script"], executor: "run.Executo
self._set_num_cuda_device_max_connections(
task,
executor,
self.num_gpus,
tp_size,
cp_size,
pp_size,
moe_a2a_overlap=moe_a2a_overlap,
enable_deepep=enable_deepep,
gpu_sm100_or_newer=self.gpu in ["b200", "gb200", "gb300"],
Expand Down
3 changes: 0 additions & 3 deletions scripts/performance/setup_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ def main(
compute_dtype: str,
fp8_recipe: str,
gpu: str,
num_gpus: int,
hf_token: str,
custom_mounts: List[str],
detach: bool,
Expand Down Expand Up @@ -87,7 +86,6 @@ def main(
plugins.append(
PerfEnvPlugin(
enable_vboost=enable_vboost,
num_gpus=num_gpus,
moe_a2a_overlap=moe_a2a_overlap,
tp_size=tp_size,
pp_size=pp_size,
Expand Down Expand Up @@ -150,7 +148,6 @@ def main(
compute_dtype=args.compute_dtype,
fp8_recipe=args.fp8_recipe,
gpu=args.gpu,
num_gpus=args.num_gpus,
hf_token=args.hf_token,
custom_mounts=args.custom_mounts,
detach=args.detach,
Expand Down