Skip to content

Commit 7af3920

Browse files
committed
refactor(recipe)!: rename vr200 GPU type and perf recipes to vrnvl72 (#6419)
Signed-off-by: Malay Nagda <malayn@nvidia.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Chen Cui <chcui@nvidia.com> (cherry picked from commit b1bb0a9) Signed-off-by: Malay Nagda <malayn@nvidia.com>
1 parent 5ddff8a commit 7af3920

58 files changed

Lines changed: 688 additions & 446 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎scripts/performance/README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,11 +239,11 @@ Mounting cached files is not enough by itself. If `HF_HUB_OFFLINE` remains `0`,
239239

240240
##### Performance arguments
241241

242-
- `-g/--gpu`: Target GPU type (`h100`, `b200`, `gb200`, `gb300`, `b300`).
242+
- `-g/--gpu`: Target GPU type (`h100`, `b200`, `gb200`, `gb300`, `b300`, `vrnvl72`). `vr200` is a deprecated alias for `vrnvl72`.
243243
- `-c/--compute_dtype`: Compute precision (`bf16`, `fp8_cs`, `fp8_mx`, `fp8_sc`, `nvfp4`). Default `bf16`.
244244
- `-vb/--enable_vboost`: Enable VBoost (tensor core power steering). Pass `true` or `false`. Disabled by default.
245245
- `-lgc/--lock_gpu_freq`: Lock GPU graphics clock to a fixed frequency in MHz (e.g. `1200`). Used for silicon simulation correlation studies. Disabled by default.
246-
- `-lmc/--peak_mem_clk`: Lock GPU memory clock to a fixed peak frequency in MHz (e.g. `2600`). Used for silicon simulation correlation studies. Defaults to `4752` MHz for VR200 and is disabled by default for other GPUs. Pass `-lmc -1` or `--peak_mem_clk -1` to disable the VR200 default.
246+
- `-lmc/--peak_mem_clk`: Lock GPU memory clock to a fixed peak frequency in MHz (e.g. `2600`). Used for silicon simulation correlation studies. Defaults to `4752` MHz for VRNVL72 and is disabled by default for other GPUs. Pass `-lmc -1` or `--peak_mem_clk -1` to disable the VRNVL72 default.
247247
- `-en/--enable_nsys`: Enable Nsight Systems profiling. Disabled by default.
248248
- `-pyp/--pytorch_profiler`: Enable PyTorch profiler. Pass `true` or `false`. Disabled by default.
249249
- `--profiling_start_step`: Defines start step for profiling. Default `10`.

‎scripts/performance/argument_parser.py‎

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,14 @@
3333
"b300": 8,
3434
"gb200": 4,
3535
"gb300": 4,
36-
"vr200": 4,
36+
"vrnvl72": 4,
3737
"r100": 1,
3838
}
3939

40+
# Deprecated --gpu names and their replacements. When the deprecation window ends, drop an entry together with
41+
# its counterpart in LEGACY_HARDWARE_ALIASES (scripts/training/recipe_metadata.py).
42+
LEGACY_GPU_ALIASES = {"vr200": "vrnvl72"}
43+
4044

4145
def list_of_strings(arg):
4246
"""Split a comma-separated string into a list of substrings."""
@@ -80,6 +84,16 @@ def lower_str(arg):
8084
return arg.lower()
8185

8286

87+
def canonical_gpu(arg: str) -> str:
88+
"""Map a deprecated GPU name to its replacement before argparse checks the choices."""
89+
if arg in LEGACY_GPU_ALIASES:
90+
# Every rank re-parses the forwarded argv, so only the launcher and global rank 0 warn.
91+
if os.environ.get("RANK", os.environ.get("SLURM_PROCID", "0")) == "0":
92+
logger.warning("--gpu %s is deprecated; use --gpu %s.", arg, LEGACY_GPU_ALIASES[arg])
93+
return LEGACY_GPU_ALIASES[arg]
94+
return arg
95+
96+
8397
def bool_arg(arg):
8498
"""Convert a string CLI value to a boolean."""
8599
if arg.lower() in ["true", "1", "t", "yes", "y"]:
@@ -787,9 +801,9 @@ def parse_cli_args():
787801
performance_args.add_argument(
788802
"-g",
789803
"--gpu",
790-
type=str,
804+
type=canonical_gpu,
791805
choices=NUM_GPUS_PER_NODE_MAP.keys(),
792-
help="Target gpu type.",
806+
help="Target gpu type. vr200 is a deprecated alias for vrnvl72.",
793807
required=True,
794808
)
795809
performance_args.add_argument(
@@ -831,8 +845,8 @@ def parse_cli_args():
831845
"--peak_mem_clk",
832846
help="Lock GPU memory clock to the specified peak frequency in MHz via "
833847
"`sudo nvidia-smi -lmc <freq>,<freq>`. Runs once per node before training. "
834-
"Defaults to 4752 MHz for VR200 and is disabled by default for other GPUs. "
835-
"Pass `-lmc -1` or `--peak_mem_clk -1` to disable the VR200 default.",
848+
"Defaults to 4752 MHz for VRNVL72 and is disabled by default for other GPUs. "
849+
"Pass `-lmc -1` or `--peak_mem_clk -1` to disable the VRNVL72 default.",
836850
type=int,
837851
required=False,
838852
default=None,

‎scripts/performance/dump_perf_configs.py‎

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@
6565
("llama", "llama3_8b", "pretrain", 8, "gb200", "nvfp4"),
6666
("llama", "llama3_8b", "pretrain", 32, "gb200", "bf16"),
6767
("llama", "llama3_8b", "pretrain", 32, "gb200", "fp8_cs"),
68-
("llama", "llama3_8b", "pretrain", 8, "vr200", "bf16"),
69-
("llama", "llama3_8b", "pretrain", 8, "vr200", "fp8_cs"),
70-
("llama", "llama3_8b", "pretrain", 8, "vr200", "fp8_mx"),
71-
("llama", "llama3_8b", "pretrain", 8, "vr200", "nvfp4"),
68+
("llama", "llama3_8b", "pretrain", 8, "vrnvl72", "bf16"),
69+
("llama", "llama3_8b", "pretrain", 8, "vrnvl72", "fp8_cs"),
70+
("llama", "llama3_8b", "pretrain", 8, "vrnvl72", "fp8_mx"),
71+
("llama", "llama3_8b", "pretrain", 8, "vrnvl72", "nvfp4"),
7272
("llama", "llama3_8b", "pretrain", 8, "b300", "bf16"),
7373
("llama", "llama3_8b", "pretrain", 8, "b300", "fp8_cs"),
7474
("llama", "llama3_8b", "pretrain", 8, "b300", "fp8_mx"),
@@ -172,10 +172,10 @@
172172
("deepseek", "deepseek_v3", "pretrain", 256, "gb200", "fp8_cs"),
173173
("deepseek", "deepseek_v3", "pretrain", 256, "gb200", "fp8_mx"),
174174
("deepseek", "deepseek_v3", "pretrain", 256, "gb200", "nvfp4"),
175-
("deepseek", "deepseek_v3", "pretrain", 256, "vr200", "bf16"),
176-
("deepseek", "deepseek_v3", "pretrain", 256, "vr200", "fp8_cs"),
177-
("deepseek", "deepseek_v3", "pretrain", 256, "vr200", "fp8_mx"),
178-
("deepseek", "deepseek_v3", "pretrain", 256, "vr200", "nvfp4"),
175+
("deepseek", "deepseek_v3", "pretrain", 256, "vrnvl72", "bf16"),
176+
("deepseek", "deepseek_v3", "pretrain", 256, "vrnvl72", "fp8_cs"),
177+
("deepseek", "deepseek_v3", "pretrain", 256, "vrnvl72", "fp8_mx"),
178+
("deepseek", "deepseek_v3", "pretrain", 256, "vrnvl72", "nvfp4"),
179179
("deepseek", "deepseek_v3", "pretrain", 256, "b300", "bf16"),
180180
("deepseek", "deepseek_v3", "pretrain", 256, "b300", "fp8_cs"),
181181
("deepseek", "deepseek_v3", "pretrain", 256, "b300", "fp8_mx"),
@@ -255,8 +255,8 @@
255255
("kimi", "kimi_k2", "pretrain", 256, "gb200", "bf16"),
256256
("kimi", "kimi_k2", "pretrain", 256, "gb200", "fp8_cs"),
257257
("kimi", "kimi_k2", "pretrain", 256, "gb200", "fp8_mx"),
258-
("kimi", "kimi_k2", "pretrain", 256, "vr200", "bf16"),
259-
("kimi", "kimi_k2", "pretrain", 256, "vr200", "fp8_mx"),
258+
("kimi", "kimi_k2", "pretrain", 256, "vrnvl72", "bf16"),
259+
("kimi", "kimi_k2", "pretrain", 256, "vrnvl72", "fp8_mx"),
260260
("kimi", "kimi_k2", "pretrain", 256, "b300", "bf16"),
261261
("kimi", "kimi_k2", "pretrain", 256, "b300", "fp8_cs"),
262262
("kimi", "kimi_k2", "pretrain", 256, "b300", "fp8_mx"),
@@ -321,9 +321,9 @@
321321
("gpt_oss", "gpt_oss_20b", "pretrain", 8, "gb300", "nvfp4"),
322322
("gpt_oss", "gpt_oss_20b", "pretrain", 72, "gb300", "nvfp4"),
323323
("gpt_oss", "gpt_oss_20b", "pretrain", 512, "gb300", "fp8_mx"),
324-
("gpt_oss", "gpt_oss_20b", "pretrain", 8, "vr200", "nvfp4"),
325-
("gpt_oss", "gpt_oss_20b", "pretrain", 8, "vr200", "fp8_mx"),
326-
("gpt_oss", "gpt_oss_20b", "pretrain", 64, "vr200", "nvfp4"),
324+
("gpt_oss", "gpt_oss_20b", "pretrain", 8, "vrnvl72", "nvfp4"),
325+
("gpt_oss", "gpt_oss_20b", "pretrain", 8, "vrnvl72", "fp8_mx"),
326+
("gpt_oss", "gpt_oss_20b", "pretrain", 64, "vrnvl72", "nvfp4"),
327327
# GPT-OSS 120B
328328
("gpt_oss", "gpt_oss_120b", "pretrain", 64, "gb300", "bf16"),
329329
("gpt_oss", "gpt_oss_120b", "pretrain", 64, "gb300", "fp8_mx"),
@@ -408,10 +408,10 @@
408408
("qwen_vl", "qwen35_vl_397b_a17b", "pretrain", 256, "h100", "bf16"),
409409
("qwen_vl", "qwen35_vl_397b_a17b", "pretrain", 256, "h100", "fp8_cs"),
410410
# Additional flattened coverage
411-
("deepseek", "deepseek_v3", "pretrain", 128, "vr200", "bf16"),
412-
("deepseek", "deepseek_v3", "pretrain", 128, "vr200", "fp8_cs"),
413-
("deepseek", "deepseek_v3", "pretrain", 128, "vr200", "fp8_mx"),
414-
("deepseek", "deepseek_v3", "pretrain", 128, "vr200", "nvfp4"),
411+
("deepseek", "deepseek_v3", "pretrain", 128, "vrnvl72", "bf16"),
412+
("deepseek", "deepseek_v3", "pretrain", 128, "vrnvl72", "fp8_cs"),
413+
("deepseek", "deepseek_v3", "pretrain", 128, "vrnvl72", "fp8_mx"),
414+
("deepseek", "deepseek_v3", "pretrain", 128, "vrnvl72", "nvfp4"),
415415
("deepseek", "deepseek_v3", "pretrain", 256, "gb300", "fp8_mx", "large_scale"),
416416
("deepseek", "deepseek_v3", "pretrain", 256, "gb200", "fp8_mx", "large_scale"),
417417
("deepseek", "deepseek_v3", "pretrain", 256, "b300", "fp8_mx", "large_scale"),
@@ -421,18 +421,18 @@
421421
("gpt_oss", "gpt_oss_20b", "pretrain", 8, "gb200", "nvfp4"),
422422
("gpt_oss", "gpt_oss_20b", "pretrain", 8, "b300", "fp8_mx"),
423423
("gpt_oss", "gpt_oss_20b", "pretrain", 8, "b300", "nvfp4"),
424-
("gpt_oss", "gpt_oss_20b", "pretrain", 8, "vr200", "fp8_mx"),
425-
("gpt_oss", "gpt_oss_20b", "pretrain", 8, "vr200", "nvfp4"),
424+
("gpt_oss", "gpt_oss_20b", "pretrain", 8, "vrnvl72", "fp8_mx"),
425+
("gpt_oss", "gpt_oss_20b", "pretrain", 8, "vrnvl72", "nvfp4"),
426426
("gpt_oss", "gpt_oss_20b", "pretrain", 64, "b300", "fp8_mx"),
427427
("gpt_oss", "gpt_oss_20b", "pretrain", 64, "b300", "nvfp4"),
428-
("gpt_oss", "gpt_oss_20b", "pretrain", 64, "vr200", "nvfp4"),
428+
("gpt_oss", "gpt_oss_20b", "pretrain", 64, "vrnvl72", "nvfp4"),
429429
("gpt_oss", "gpt_oss_20b", "pretrain", 72, "gb300", "nvfp4"),
430430
("gpt_oss", "gpt_oss_20b", "pretrain", 72, "gb200", "nvfp4"),
431-
("gpt_oss", "gpt_oss_120b", "pretrain", 64, "vr200", "bf16"),
432-
("gpt_oss", "gpt_oss_120b", "pretrain", 64, "vr200", "fp8_mx"),
433-
("llama", "llama3_70b", "pretrain", 64, "vr200", "bf16"),
434-
("llama", "llama3_70b", "pretrain", 64, "vr200", "fp8_mx"),
435-
("llama", "llama3_70b", "pretrain", 64, "vr200", "nvfp4"),
431+
("gpt_oss", "gpt_oss_120b", "pretrain", 64, "vrnvl72", "bf16"),
432+
("gpt_oss", "gpt_oss_120b", "pretrain", 64, "vrnvl72", "fp8_mx"),
433+
("llama", "llama3_70b", "pretrain", 64, "vrnvl72", "bf16"),
434+
("llama", "llama3_70b", "pretrain", 64, "vrnvl72", "fp8_mx"),
435+
("llama", "llama3_70b", "pretrain", 64, "vrnvl72", "nvfp4"),
436436
("llama", "llama31_405b", "pretrain", 128, "gb300", "bf16"),
437437
("llama", "llama31_405b", "pretrain", 128, "gb300", "fp8_cs"),
438438
("llama", "llama31_405b", "pretrain", 128, "gb300", "fp8_mx"),
@@ -447,19 +447,19 @@
447447
("llama", "llama31_405b", "pretrain", 256, "b300", "nvfp4"),
448448
("llama", "llama31_405b", "pretrain", 256, "b200", "fp8_mx"),
449449
("llama", "llama31_405b", "pretrain", 256, "b200", "nvfp4"),
450-
("llama", "llama31_405b", "pretrain", 256, "vr200", "bf16"),
451-
("llama", "llama31_405b", "pretrain", 256, "vr200", "fp8_mx"),
452-
("llama", "llama31_405b", "pretrain", 256, "vr200", "nvfp4"),
453-
("nemotronh", "nemotron_3_nano", "pretrain", 8, "vr200", "bf16"),
454-
("nemotronh", "nemotron_3_nano", "pretrain", 8, "vr200", "fp8_mx"),
455-
("nemotronh", "nemotron_3_nano", "pretrain", 8, "vr200", "nvfp4"),
456-
("nemotronh", "nemotron_3_super", "pretrain", 64, "vr200", "bf16"),
457-
("nemotronh", "nemotron_3_super", "pretrain", 64, "vr200", "fp8_mx"),
458-
("nemotronh", "nemotron_3_super", "pretrain", 64, "vr200", "nvfp4"),
459-
("nemotronh", "nemotron_3_ultra", "pretrain", 256, "vr200", "fp8_mx"),
460-
("nemotronh", "nemotron_3_ultra", "pretrain", 256, "vr200", "nvfp4"),
461-
("qwen", "qwen3_30b_a3b", "pretrain", 8, "vr200", "bf16"),
462-
("qwen", "qwen3_30b_a3b", "pretrain", 8, "vr200", "fp8_mx"),
450+
("llama", "llama31_405b", "pretrain", 256, "vrnvl72", "bf16"),
451+
("llama", "llama31_405b", "pretrain", 256, "vrnvl72", "fp8_mx"),
452+
("llama", "llama31_405b", "pretrain", 256, "vrnvl72", "nvfp4"),
453+
("nemotronh", "nemotron_3_nano", "pretrain", 8, "vrnvl72", "bf16"),
454+
("nemotronh", "nemotron_3_nano", "pretrain", 8, "vrnvl72", "fp8_mx"),
455+
("nemotronh", "nemotron_3_nano", "pretrain", 8, "vrnvl72", "nvfp4"),
456+
("nemotronh", "nemotron_3_super", "pretrain", 64, "vrnvl72", "bf16"),
457+
("nemotronh", "nemotron_3_super", "pretrain", 64, "vrnvl72", "fp8_mx"),
458+
("nemotronh", "nemotron_3_super", "pretrain", 64, "vrnvl72", "nvfp4"),
459+
("nemotronh", "nemotron_3_ultra", "pretrain", 256, "vrnvl72", "fp8_mx"),
460+
("nemotronh", "nemotron_3_ultra", "pretrain", 256, "vrnvl72", "nvfp4"),
461+
("qwen", "qwen3_30b_a3b", "pretrain", 8, "vrnvl72", "bf16"),
462+
("qwen", "qwen3_30b_a3b", "pretrain", 8, "vrnvl72", "fp8_mx"),
463463
("qwen", "qwen3_235b_a22b", "pretrain", 64, "gb300", "bf16"),
464464
("qwen", "qwen3_235b_a22b", "pretrain", 64, "gb300", "fp8_cs"),
465465
("qwen", "qwen3_235b_a22b", "pretrain", 64, "gb300", "fp8_mx"),
@@ -476,9 +476,9 @@
476476
("qwen", "qwen3_235b_a22b", "pretrain", 64, "b200", "fp8_cs"),
477477
("qwen", "qwen3_235b_a22b", "pretrain", 64, "b200", "fp8_mx"),
478478
("qwen", "qwen3_235b_a22b", "pretrain", 64, "b200", "nvfp4"),
479-
("qwen", "qwen3_235b_a22b", "pretrain", 256, "vr200", "bf16"),
480-
("qwen", "qwen3_235b_a22b", "pretrain", 256, "vr200", "fp8_mx"),
481-
("qwen", "qwen3_235b_a22b", "pretrain", 256, "vr200", "nvfp4"),
479+
("qwen", "qwen3_235b_a22b", "pretrain", 256, "vrnvl72", "bf16"),
480+
("qwen", "qwen3_235b_a22b", "pretrain", 256, "vrnvl72", "fp8_mx"),
481+
("qwen", "qwen3_235b_a22b", "pretrain", 256, "vrnvl72", "nvfp4"),
482482
("qwen", "qwen3_235b_a22b", "pretrain", 256, "gb300", "fp8_mx", "large_scale"),
483483
("qwen", "qwen3_235b_a22b", "pretrain", 256, "gb200", "fp8_mx", "large_scale"),
484484
("qwen", "qwen3_235b_a22b", "pretrain", 256, "b300", "fp8_mx", "large_scale"),

‎scripts/performance/setup_experiment.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ def main(
672672
]
673673
)
674674

675-
if peak_mem_clk is None and gpu == "vr200":
675+
if peak_mem_clk is None and gpu == "vrnvl72":
676676
peak_mem_clk = 4752
677677
if peak_mem_clk == -1:
678678
peak_mem_clk = None

‎scripts/performance/utils/executors.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def slurm_executor(
185185
log_repo_status_cmd = "bash /opt/Megatron-Bridge/docker/common/print_sha.sh /nemo_run/configs/repo_status.json"
186186
custom_bash_cmds.append(log_repo_status_cmd)
187187

188-
numa_divisor = 2 if gpu.lower() in ["gb200", "gb300", "vr200"] else 4
188+
numa_divisor = 2 if gpu.lower() in ["gb200", "gb300", "vrnvl72"] else 4
189189
numa_cmd = f"numactl --cpunodebind=$((SLURM_LOCALID/{numa_divisor})) --membind=$((SLURM_LOCALID/{numa_divisor}))"
190190
if gpu.lower() in ["b300"] and enable_pct_binding:
191191
numa_cmd += " -C $((SLURM_LOCALID * 16)),$((SLURM_LOCALID * 16 + 1))"

‎scripts/performance/utils/overrides.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def _apply_flat_cli_environment_compatibility(
280280
if connection_override:
281281
moe_a2a_overlap = args.moe_a2a_overlap if args.moe_a2a_overlap is not None else base_moe_a2a_overlap
282282
max_connections = 32 if effective_dispatcher_backend in {"deepep", "hybridep", "ncclep"} else 8
283-
if gpu in {"b200", "b300", "gb200", "gb300", "vr200"}:
283+
if gpu in {"b200", "b300", "gb200", "gb300", "vrnvl72"}:
284284
max_connections = 32
285285
elif (tp_size > 1 or cp_size > 1) and not moe_a2a_overlap:
286286
max_connections = 1
@@ -292,7 +292,7 @@ def _apply_flat_cli_environment_compatibility(
292292
if gpu in {"h100", "b200", "b300"}:
293293
domain_size = 8
294294
ranks_per_domain = min(ep_size, domain_size)
295-
elif gpu in {"gb200", "gb300", "vr200", "r100"}:
295+
elif gpu in {"gb200", "gb300", "vrnvl72", "r100"}:
296296
domain_size = 72
297297
if ep_size > domain_size:
298298
raise ValueError("HybridEP expert parallel size must not exceed the 72-rank NVLink domain.")

‎scripts/performance/utils/utils.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ def apply_target_topology_environment(
324324
"NVLINK_DOMAIN_SIZE": 8,
325325
"USE_MNNVL": 0,
326326
}
327-
elif normalized_gpu in {"gb200", "gb300", "vr200", "r100"}:
327+
elif normalized_gpu in {"gb200", "gb300", "vrnvl72", "r100"}:
328328
if expert_model_parallel_size > 72:
329329
raise ValueError("HybridEP expert parallel size must not exceed the 72-rank NVLink domain.")
330330
topology = {

‎scripts/training/README.md‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ through configurable library recipes. Explicit benchmark dataset replacement rem
107107
Five legacy duplicate names resolve to the benchmark definition; their library workloads remain available through
108108
the corresponding generic recipe aliases. New recipe names should be unique across both packages.
109109

110+
Benchmark recipe names that use the deprecated `vr200` hardware name resolve to the renamed `vrnvl72` recipe with a
111+
warning.
112+
110113
Text recipes default to `llm_step`; all recipes infer their modality-specific forward step from the same registry.
111114
Pass `--step-func NAME` to override that selection. Common training,
112115
sequence-length, parallelism, optimization, and checkpoint fields also have convenience flags such as
@@ -340,8 +343,8 @@ populate the executor's `additional_parameters` and are not forwarded to the
340343
training command or its srun step.
341344

342345
Use `-lmc FREQ`, `--peak-mem-clk FREQ`, or `--peak_mem_clk FREQ` to lock the GPU memory clock to a fixed frequency in
343-
MHz once per node before training. VR200 benchmark recipes default to `4752`; other recipes leave the memory clock
344-
unlocked. Pass `-lmc -1` to disable the VR200 default explicitly.
346+
MHz once per node before training. VRNVL72 benchmark recipes default to `4752`; other recipes leave the memory clock
347+
unlocked. Pass `-lmc -1` to disable the VRNVL72 default explicitly.
345348

346349
The compact launcher does not add rank-command prefixes or infer target-specific
347350
allocation and NUMA policies. Configure those explicitly for the target.

‎scripts/training/recipe_metadata.py‎

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,15 @@
1919
import argparse
2020
import ast
2121
import functools
22+
import logging
23+
import os
2224
import re
2325
from dataclasses import dataclass
2426
from pathlib import Path
2527

2628

29+
logger = logging.getLogger(__name__)
30+
2731
BENCHMARK_RECIPE_FAMILY_PREFIXES = (
2832
("qwen3_vl_", "qwen_vl"),
2933
("qwen35_vl_", "qwen_vl"),
@@ -45,6 +49,10 @@
4549
r"(?:_[a-z0-9_]+)?_config$"
4650
)
4751

52+
# Deprecated recipe hardware names and their replacements. When the deprecation window ends, drop an entry together
53+
# with its counterpart in LEGACY_GPU_ALIASES (scripts/performance/argument_parser.py).
54+
LEGACY_HARDWARE_ALIASES = {"vr200": "vrnvl72"}
55+
4856
BENCHMARK_RECIPE_ROOT = Path(__file__).resolve().parents[2] / "src" / "megatron" / "bridge" / "perf_recipes"
4957

5058
# These names are exported by both recipe packages today. Bare recipe lookup
@@ -181,8 +189,31 @@ def available_benchmark_recipe_metadata(recipe_name: str) -> BenchmarkRecipeMeta
181189
return metadata
182190

183191

192+
@functools.lru_cache(maxsize=None)
193+
def _canonical_recipe_name(recipe_name: str) -> str:
194+
"""Replace a deprecated hardware name in a benchmark recipe name when the renamed recipe is exported.
195+
196+
Cached so each process logs the deprecation once per requested name.
197+
"""
198+
match = BENCHMARK_RECIPE_PATTERN.search(recipe_name)
199+
if match is None or match.group("hardware") not in LEGACY_HARDWARE_ALIASES:
200+
return recipe_name
201+
start, end = match.span("hardware")
202+
canonical_name = f"{recipe_name[:start]}{LEGACY_HARDWARE_ALIASES[match.group('hardware')]}{recipe_name[end:]}"
203+
if available_benchmark_recipe_metadata(canonical_name) is None:
204+
return recipe_name
205+
# Every rank re-runs this lookup, so only the launcher and global rank 0 warn.
206+
if os.environ.get("RANK", os.environ.get("SLURM_PROCID", "0")) == "0":
207+
logger.warning("Recipe '%s' uses a deprecated hardware name; use '%s'.", recipe_name, canonical_name)
208+
return canonical_name
209+
210+
184211
def resolved_benchmark_recipe_metadata(recipe_name: str) -> BenchmarkRecipeMetadata | None:
185-
"""Return benchmark metadata after applying unified lookup precedence."""
212+
"""Return benchmark metadata after applying legacy hardware aliases and unified lookup precedence.
213+
214+
A deprecated hardware name resolves to the renamed recipe, so callers load ``metadata.recipe_name``.
215+
"""
216+
recipe_name = _canonical_recipe_name(recipe_name)
186217
if recipe_name in LIBRARY_RECIPE_PRECEDENCE_COLLISIONS:
187218
return None
188219
return available_benchmark_recipe_metadata(recipe_name)

‎scripts/training/recipe_runner.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,10 @@ def load_recipe(
233233
seq_length: int | None = None,
234234
) -> ConfigContainer:
235235
"""Load an exact benchmark recipe when exported, otherwise a library recipe."""
236-
if resolved_benchmark_recipe_metadata(recipe_name) is not None:
236+
benchmark_metadata = resolved_benchmark_recipe_metadata(recipe_name)
237+
if benchmark_metadata is not None:
238+
# The resolved name replaces a deprecated hardware name in the requested one.
239+
recipe_name = benchmark_metadata.recipe_name
237240
config_builder = find_benchmark_recipe(recipe_name)
238241
package_name = "megatron.bridge.perf_recipes"
239242
recipe_kind = "benchmark"

0 commit comments

Comments
 (0)