diff --git a/scripts/performance/README.md b/scripts/performance/README.md index b5b2c6d854..8f7b2f28ec 100644 --- a/scripts/performance/README.md +++ b/scripts/performance/README.md @@ -239,11 +239,11 @@ Mounting cached files is not enough by itself. If `HF_HUB_OFFLINE` remains `0`, ##### Performance arguments -- `-g/--gpu`: Target GPU type (`h100`, `b200`, `gb200`, `gb300`, `b300`). +- `-g/--gpu`: Target GPU type (`h100`, `b200`, `gb200`, `gb300`, `b300`, `vrnvl72`). `vr200` is a deprecated alias for `vrnvl72`. - `-c/--compute_dtype`: Compute precision (`bf16`, `fp8_cs`, `fp8_mx`, `fp8_sc`, `nvfp4`). Default `bf16`. - `-vb/--enable_vboost`: Enable VBoost (tensor core power steering). Pass `true` or `false`. Disabled by default. - `-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. -- `-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. +- `-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. - `-en/--enable_nsys`: Enable Nsight Systems profiling. Disabled by default. - `-pyp/--pytorch_profiler`: Enable PyTorch profiler. Pass `true` or `false`. Disabled by default. - `--profiling_start_step`: Defines start step for profiling. Default `10`. diff --git a/scripts/performance/argument_parser.py b/scripts/performance/argument_parser.py index 235fb43411..89f43a6d1d 100644 --- a/scripts/performance/argument_parser.py +++ b/scripts/performance/argument_parser.py @@ -33,10 +33,14 @@ "b300": 8, "gb200": 4, "gb300": 4, - "vr200": 4, + "vrnvl72": 4, "r100": 1, } +# Deprecated --gpu names and their replacements. When the deprecation window ends, drop an entry together with +# its counterpart in LEGACY_HARDWARE_ALIASES (scripts/training/recipe_metadata.py). +LEGACY_GPU_ALIASES = {"vr200": "vrnvl72"} + def list_of_strings(arg): """Split a comma-separated string into a list of substrings.""" @@ -80,6 +84,16 @@ def lower_str(arg): return arg.lower() +def canonical_gpu(arg: str) -> str: + """Map a deprecated GPU name to its replacement before argparse checks the choices.""" + if arg in LEGACY_GPU_ALIASES: + # Every rank re-parses the forwarded argv, so only the launcher and global rank 0 warn. + if os.environ.get("RANK", os.environ.get("SLURM_PROCID", "0")) == "0": + logger.warning("--gpu %s is deprecated; use --gpu %s.", arg, LEGACY_GPU_ALIASES[arg]) + return LEGACY_GPU_ALIASES[arg] + return arg + + def bool_arg(arg): """Convert a string CLI value to a boolean.""" if arg.lower() in ["true", "1", "t", "yes", "y"]: @@ -787,9 +801,9 @@ def parse_cli_args(): performance_args.add_argument( "-g", "--gpu", - type=str, + type=canonical_gpu, choices=NUM_GPUS_PER_NODE_MAP.keys(), - help="Target gpu type.", + help="Target gpu type. vr200 is a deprecated alias for vrnvl72.", required=True, ) performance_args.add_argument( @@ -831,8 +845,8 @@ def parse_cli_args(): "--peak_mem_clk", help="Lock GPU memory clock to the specified peak frequency in MHz via " "`sudo nvidia-smi -lmc ,`. Runs once per node before training. " - "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.", + "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.", type=int, required=False, default=None, diff --git a/scripts/performance/dump_perf_configs.py b/scripts/performance/dump_perf_configs.py index 4c31f82cfc..f7a0295a89 100644 --- a/scripts/performance/dump_perf_configs.py +++ b/scripts/performance/dump_perf_configs.py @@ -65,10 +65,10 @@ ("llama", "llama3_8b", "pretrain", 8, "gb200", "nvfp4"), ("llama", "llama3_8b", "pretrain", 32, "gb200", "bf16"), ("llama", "llama3_8b", "pretrain", 32, "gb200", "fp8_cs"), - ("llama", "llama3_8b", "pretrain", 8, "vr200", "bf16"), - ("llama", "llama3_8b", "pretrain", 8, "vr200", "fp8_cs"), - ("llama", "llama3_8b", "pretrain", 8, "vr200", "fp8_mx"), - ("llama", "llama3_8b", "pretrain", 8, "vr200", "nvfp4"), + ("llama", "llama3_8b", "pretrain", 8, "vrnvl72", "bf16"), + ("llama", "llama3_8b", "pretrain", 8, "vrnvl72", "fp8_cs"), + ("llama", "llama3_8b", "pretrain", 8, "vrnvl72", "fp8_mx"), + ("llama", "llama3_8b", "pretrain", 8, "vrnvl72", "nvfp4"), ("llama", "llama3_8b", "pretrain", 8, "b300", "bf16"), ("llama", "llama3_8b", "pretrain", 8, "b300", "fp8_cs"), ("llama", "llama3_8b", "pretrain", 8, "b300", "fp8_mx"), @@ -172,10 +172,10 @@ ("deepseek", "deepseek_v3", "pretrain", 256, "gb200", "fp8_cs"), ("deepseek", "deepseek_v3", "pretrain", 256, "gb200", "fp8_mx"), ("deepseek", "deepseek_v3", "pretrain", 256, "gb200", "nvfp4"), - ("deepseek", "deepseek_v3", "pretrain", 256, "vr200", "bf16"), - ("deepseek", "deepseek_v3", "pretrain", 256, "vr200", "fp8_cs"), - ("deepseek", "deepseek_v3", "pretrain", 256, "vr200", "fp8_mx"), - ("deepseek", "deepseek_v3", "pretrain", 256, "vr200", "nvfp4"), + ("deepseek", "deepseek_v3", "pretrain", 256, "vrnvl72", "bf16"), + ("deepseek", "deepseek_v3", "pretrain", 256, "vrnvl72", "fp8_cs"), + ("deepseek", "deepseek_v3", "pretrain", 256, "vrnvl72", "fp8_mx"), + ("deepseek", "deepseek_v3", "pretrain", 256, "vrnvl72", "nvfp4"), ("deepseek", "deepseek_v3", "pretrain", 256, "b300", "bf16"), ("deepseek", "deepseek_v3", "pretrain", 256, "b300", "fp8_cs"), ("deepseek", "deepseek_v3", "pretrain", 256, "b300", "fp8_mx"), @@ -255,8 +255,8 @@ ("kimi", "kimi_k2", "pretrain", 256, "gb200", "bf16"), ("kimi", "kimi_k2", "pretrain", 256, "gb200", "fp8_cs"), ("kimi", "kimi_k2", "pretrain", 256, "gb200", "fp8_mx"), - ("kimi", "kimi_k2", "pretrain", 256, "vr200", "bf16"), - ("kimi", "kimi_k2", "pretrain", 256, "vr200", "fp8_mx"), + ("kimi", "kimi_k2", "pretrain", 256, "vrnvl72", "bf16"), + ("kimi", "kimi_k2", "pretrain", 256, "vrnvl72", "fp8_mx"), ("kimi", "kimi_k2", "pretrain", 256, "b300", "bf16"), ("kimi", "kimi_k2", "pretrain", 256, "b300", "fp8_cs"), ("kimi", "kimi_k2", "pretrain", 256, "b300", "fp8_mx"), @@ -321,9 +321,9 @@ ("gpt_oss", "gpt_oss_20b", "pretrain", 8, "gb300", "nvfp4"), ("gpt_oss", "gpt_oss_20b", "pretrain", 72, "gb300", "nvfp4"), ("gpt_oss", "gpt_oss_20b", "pretrain", 512, "gb300", "fp8_mx"), - ("gpt_oss", "gpt_oss_20b", "pretrain", 8, "vr200", "nvfp4"), - ("gpt_oss", "gpt_oss_20b", "pretrain", 8, "vr200", "fp8_mx"), - ("gpt_oss", "gpt_oss_20b", "pretrain", 64, "vr200", "nvfp4"), + ("gpt_oss", "gpt_oss_20b", "pretrain", 8, "vrnvl72", "nvfp4"), + ("gpt_oss", "gpt_oss_20b", "pretrain", 8, "vrnvl72", "fp8_mx"), + ("gpt_oss", "gpt_oss_20b", "pretrain", 64, "vrnvl72", "nvfp4"), # GPT-OSS 120B ("gpt_oss", "gpt_oss_120b", "pretrain", 64, "gb300", "bf16"), ("gpt_oss", "gpt_oss_120b", "pretrain", 64, "gb300", "fp8_mx"), @@ -408,10 +408,10 @@ ("qwen_vl", "qwen35_vl_397b_a17b", "pretrain", 256, "h100", "bf16"), ("qwen_vl", "qwen35_vl_397b_a17b", "pretrain", 256, "h100", "fp8_cs"), # Additional flattened coverage - ("deepseek", "deepseek_v3", "pretrain", 128, "vr200", "bf16"), - ("deepseek", "deepseek_v3", "pretrain", 128, "vr200", "fp8_cs"), - ("deepseek", "deepseek_v3", "pretrain", 128, "vr200", "fp8_mx"), - ("deepseek", "deepseek_v3", "pretrain", 128, "vr200", "nvfp4"), + ("deepseek", "deepseek_v3", "pretrain", 128, "vrnvl72", "bf16"), + ("deepseek", "deepseek_v3", "pretrain", 128, "vrnvl72", "fp8_cs"), + ("deepseek", "deepseek_v3", "pretrain", 128, "vrnvl72", "fp8_mx"), + ("deepseek", "deepseek_v3", "pretrain", 128, "vrnvl72", "nvfp4"), ("deepseek", "deepseek_v3", "pretrain", 256, "gb300", "fp8_mx", "large_scale"), ("deepseek", "deepseek_v3", "pretrain", 256, "gb200", "fp8_mx", "large_scale"), ("deepseek", "deepseek_v3", "pretrain", 256, "b300", "fp8_mx", "large_scale"), @@ -421,18 +421,18 @@ ("gpt_oss", "gpt_oss_20b", "pretrain", 8, "gb200", "nvfp4"), ("gpt_oss", "gpt_oss_20b", "pretrain", 8, "b300", "fp8_mx"), ("gpt_oss", "gpt_oss_20b", "pretrain", 8, "b300", "nvfp4"), - ("gpt_oss", "gpt_oss_20b", "pretrain", 8, "vr200", "fp8_mx"), - ("gpt_oss", "gpt_oss_20b", "pretrain", 8, "vr200", "nvfp4"), + ("gpt_oss", "gpt_oss_20b", "pretrain", 8, "vrnvl72", "fp8_mx"), + ("gpt_oss", "gpt_oss_20b", "pretrain", 8, "vrnvl72", "nvfp4"), ("gpt_oss", "gpt_oss_20b", "pretrain", 64, "b300", "fp8_mx"), ("gpt_oss", "gpt_oss_20b", "pretrain", 64, "b300", "nvfp4"), - ("gpt_oss", "gpt_oss_20b", "pretrain", 64, "vr200", "nvfp4"), + ("gpt_oss", "gpt_oss_20b", "pretrain", 64, "vrnvl72", "nvfp4"), ("gpt_oss", "gpt_oss_20b", "pretrain", 72, "gb300", "nvfp4"), ("gpt_oss", "gpt_oss_20b", "pretrain", 72, "gb200", "nvfp4"), - ("gpt_oss", "gpt_oss_120b", "pretrain", 64, "vr200", "bf16"), - ("gpt_oss", "gpt_oss_120b", "pretrain", 64, "vr200", "fp8_mx"), - ("llama", "llama3_70b", "pretrain", 64, "vr200", "bf16"), - ("llama", "llama3_70b", "pretrain", 64, "vr200", "fp8_mx"), - ("llama", "llama3_70b", "pretrain", 64, "vr200", "nvfp4"), + ("gpt_oss", "gpt_oss_120b", "pretrain", 64, "vrnvl72", "bf16"), + ("gpt_oss", "gpt_oss_120b", "pretrain", 64, "vrnvl72", "fp8_mx"), + ("llama", "llama3_70b", "pretrain", 64, "vrnvl72", "bf16"), + ("llama", "llama3_70b", "pretrain", 64, "vrnvl72", "fp8_mx"), + ("llama", "llama3_70b", "pretrain", 64, "vrnvl72", "nvfp4"), ("llama", "llama31_405b", "pretrain", 128, "gb300", "bf16"), ("llama", "llama31_405b", "pretrain", 128, "gb300", "fp8_cs"), ("llama", "llama31_405b", "pretrain", 128, "gb300", "fp8_mx"), @@ -447,19 +447,19 @@ ("llama", "llama31_405b", "pretrain", 256, "b300", "nvfp4"), ("llama", "llama31_405b", "pretrain", 256, "b200", "fp8_mx"), ("llama", "llama31_405b", "pretrain", 256, "b200", "nvfp4"), - ("llama", "llama31_405b", "pretrain", 256, "vr200", "bf16"), - ("llama", "llama31_405b", "pretrain", 256, "vr200", "fp8_mx"), - ("llama", "llama31_405b", "pretrain", 256, "vr200", "nvfp4"), - ("nemotronh", "nemotron_3_nano", "pretrain", 8, "vr200", "bf16"), - ("nemotronh", "nemotron_3_nano", "pretrain", 8, "vr200", "fp8_mx"), - ("nemotronh", "nemotron_3_nano", "pretrain", 8, "vr200", "nvfp4"), - ("nemotronh", "nemotron_3_super", "pretrain", 64, "vr200", "bf16"), - ("nemotronh", "nemotron_3_super", "pretrain", 64, "vr200", "fp8_mx"), - ("nemotronh", "nemotron_3_super", "pretrain", 64, "vr200", "nvfp4"), - ("nemotronh", "nemotron_3_ultra", "pretrain", 256, "vr200", "fp8_mx"), - ("nemotronh", "nemotron_3_ultra", "pretrain", 256, "vr200", "nvfp4"), - ("qwen", "qwen3_30b_a3b", "pretrain", 8, "vr200", "bf16"), - ("qwen", "qwen3_30b_a3b", "pretrain", 8, "vr200", "fp8_mx"), + ("llama", "llama31_405b", "pretrain", 256, "vrnvl72", "bf16"), + ("llama", "llama31_405b", "pretrain", 256, "vrnvl72", "fp8_mx"), + ("llama", "llama31_405b", "pretrain", 256, "vrnvl72", "nvfp4"), + ("nemotronh", "nemotron_3_nano", "pretrain", 8, "vrnvl72", "bf16"), + ("nemotronh", "nemotron_3_nano", "pretrain", 8, "vrnvl72", "fp8_mx"), + ("nemotronh", "nemotron_3_nano", "pretrain", 8, "vrnvl72", "nvfp4"), + ("nemotronh", "nemotron_3_super", "pretrain", 64, "vrnvl72", "bf16"), + ("nemotronh", "nemotron_3_super", "pretrain", 64, "vrnvl72", "fp8_mx"), + ("nemotronh", "nemotron_3_super", "pretrain", 64, "vrnvl72", "nvfp4"), + ("nemotronh", "nemotron_3_ultra", "pretrain", 256, "vrnvl72", "fp8_mx"), + ("nemotronh", "nemotron_3_ultra", "pretrain", 256, "vrnvl72", "nvfp4"), + ("qwen", "qwen3_30b_a3b", "pretrain", 8, "vrnvl72", "bf16"), + ("qwen", "qwen3_30b_a3b", "pretrain", 8, "vrnvl72", "fp8_mx"), ("qwen", "qwen3_235b_a22b", "pretrain", 64, "gb300", "bf16"), ("qwen", "qwen3_235b_a22b", "pretrain", 64, "gb300", "fp8_cs"), ("qwen", "qwen3_235b_a22b", "pretrain", 64, "gb300", "fp8_mx"), @@ -476,9 +476,9 @@ ("qwen", "qwen3_235b_a22b", "pretrain", 64, "b200", "fp8_cs"), ("qwen", "qwen3_235b_a22b", "pretrain", 64, "b200", "fp8_mx"), ("qwen", "qwen3_235b_a22b", "pretrain", 64, "b200", "nvfp4"), - ("qwen", "qwen3_235b_a22b", "pretrain", 256, "vr200", "bf16"), - ("qwen", "qwen3_235b_a22b", "pretrain", 256, "vr200", "fp8_mx"), - ("qwen", "qwen3_235b_a22b", "pretrain", 256, "vr200", "nvfp4"), + ("qwen", "qwen3_235b_a22b", "pretrain", 256, "vrnvl72", "bf16"), + ("qwen", "qwen3_235b_a22b", "pretrain", 256, "vrnvl72", "fp8_mx"), + ("qwen", "qwen3_235b_a22b", "pretrain", 256, "vrnvl72", "nvfp4"), ("qwen", "qwen3_235b_a22b", "pretrain", 256, "gb300", "fp8_mx", "large_scale"), ("qwen", "qwen3_235b_a22b", "pretrain", 256, "gb200", "fp8_mx", "large_scale"), ("qwen", "qwen3_235b_a22b", "pretrain", 256, "b300", "fp8_mx", "large_scale"), diff --git a/scripts/performance/setup_experiment.py b/scripts/performance/setup_experiment.py index 807a46e6b1..fd12119cf7 100755 --- a/scripts/performance/setup_experiment.py +++ b/scripts/performance/setup_experiment.py @@ -672,7 +672,7 @@ def main( ] ) - if peak_mem_clk is None and gpu == "vr200": + if peak_mem_clk is None and gpu == "vrnvl72": peak_mem_clk = 4752 if peak_mem_clk == -1: peak_mem_clk = None diff --git a/scripts/performance/utils/executors.py b/scripts/performance/utils/executors.py index 59b25d3428..f229eef2db 100644 --- a/scripts/performance/utils/executors.py +++ b/scripts/performance/utils/executors.py @@ -185,7 +185,7 @@ def slurm_executor( log_repo_status_cmd = "bash /opt/Megatron-Bridge/docker/common/print_sha.sh /nemo_run/configs/repo_status.json" custom_bash_cmds.append(log_repo_status_cmd) - numa_divisor = 2 if gpu.lower() in ["gb200", "gb300", "vr200"] else 4 + numa_divisor = 2 if gpu.lower() in ["gb200", "gb300", "vrnvl72"] else 4 numa_cmd = f"numactl --cpunodebind=$((SLURM_LOCALID/{numa_divisor})) --membind=$((SLURM_LOCALID/{numa_divisor}))" if gpu.lower() in ["b300"] and enable_pct_binding: numa_cmd += " -C $((SLURM_LOCALID * 16)),$((SLURM_LOCALID * 16 + 1))" diff --git a/scripts/performance/utils/overrides.py b/scripts/performance/utils/overrides.py index 1830bb19dc..17586c22ab 100644 --- a/scripts/performance/utils/overrides.py +++ b/scripts/performance/utils/overrides.py @@ -280,7 +280,7 @@ def _apply_flat_cli_environment_compatibility( if connection_override: moe_a2a_overlap = args.moe_a2a_overlap if args.moe_a2a_overlap is not None else base_moe_a2a_overlap max_connections = 32 if effective_dispatcher_backend in {"deepep", "hybridep", "ncclep"} else 8 - if gpu in {"b200", "b300", "gb200", "gb300", "vr200"}: + if gpu in {"b200", "b300", "gb200", "gb300", "vrnvl72"}: max_connections = 32 elif (tp_size > 1 or cp_size > 1) and not moe_a2a_overlap: max_connections = 1 @@ -292,7 +292,7 @@ def _apply_flat_cli_environment_compatibility( if gpu in {"h100", "b200", "b300"}: domain_size = 8 ranks_per_domain = min(ep_size, domain_size) - elif gpu in {"gb200", "gb300", "vr200", "r100"}: + elif gpu in {"gb200", "gb300", "vrnvl72", "r100"}: domain_size = 72 if ep_size > domain_size: raise ValueError("HybridEP expert parallel size must not exceed the 72-rank NVLink domain.") diff --git a/scripts/performance/utils/utils.py b/scripts/performance/utils/utils.py index 54c6f4053c..26a8a90036 100644 --- a/scripts/performance/utils/utils.py +++ b/scripts/performance/utils/utils.py @@ -324,7 +324,7 @@ def apply_target_topology_environment( "NVLINK_DOMAIN_SIZE": 8, "USE_MNNVL": 0, } - elif normalized_gpu in {"gb200", "gb300", "vr200", "r100"}: + elif normalized_gpu in {"gb200", "gb300", "vrnvl72", "r100"}: if expert_model_parallel_size > 72: raise ValueError("HybridEP expert parallel size must not exceed the 72-rank NVLink domain.") topology = { diff --git a/scripts/training/README.md b/scripts/training/README.md index bd86810fcd..8d84139230 100644 --- a/scripts/training/README.md +++ b/scripts/training/README.md @@ -107,6 +107,9 @@ through configurable library recipes. Explicit benchmark dataset replacement rem Five legacy duplicate names resolve to the benchmark definition; their library workloads remain available through the corresponding generic recipe aliases. New recipe names should be unique across both packages. +Benchmark recipe names that use the deprecated `vr200` hardware name resolve to the renamed `vrnvl72` recipe with a +warning. + Text recipes default to `llm_step`; all recipes infer their modality-specific forward step from the same registry. Pass `--step-func NAME` to override that selection. Common training, 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 training command or its srun step. Use `-lmc FREQ`, `--peak-mem-clk FREQ`, or `--peak_mem_clk FREQ` to lock the GPU memory clock to a fixed frequency in -MHz once per node before training. VR200 benchmark recipes default to `4752`; other recipes leave the memory clock -unlocked. Pass `-lmc -1` to disable the VR200 default explicitly. +MHz once per node before training. VRNVL72 benchmark recipes default to `4752`; other recipes leave the memory clock +unlocked. Pass `-lmc -1` to disable the VRNVL72 default explicitly. The compact launcher does not add rank-command prefixes or infer target-specific allocation and NUMA policies. Configure those explicitly for the target. diff --git a/scripts/training/recipe_metadata.py b/scripts/training/recipe_metadata.py index f29d948a5f..54bbccc450 100644 --- a/scripts/training/recipe_metadata.py +++ b/scripts/training/recipe_metadata.py @@ -19,11 +19,15 @@ import argparse import ast import functools +import logging +import os import re from dataclasses import dataclass from pathlib import Path +logger = logging.getLogger(__name__) + BENCHMARK_RECIPE_FAMILY_PREFIXES = ( ("qwen3_vl_", "qwen_vl"), ("qwen35_vl_", "qwen_vl"), @@ -45,6 +49,10 @@ r"(?:_[a-z0-9_]+)?_config$" ) +# Deprecated recipe hardware names and their replacements. When the deprecation window ends, drop an entry together +# with its counterpart in LEGACY_GPU_ALIASES (scripts/performance/argument_parser.py). +LEGACY_HARDWARE_ALIASES = {"vr200": "vrnvl72"} + BENCHMARK_RECIPE_ROOT = Path(__file__).resolve().parents[2] / "src" / "megatron" / "bridge" / "perf_recipes" # 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 return metadata +@functools.lru_cache(maxsize=None) +def _canonical_recipe_name(recipe_name: str) -> str: + """Replace a deprecated hardware name in a benchmark recipe name when the renamed recipe is exported. + + Cached so each process logs the deprecation once per requested name. + """ + match = BENCHMARK_RECIPE_PATTERN.search(recipe_name) + if match is None or match.group("hardware") not in LEGACY_HARDWARE_ALIASES: + return recipe_name + start, end = match.span("hardware") + canonical_name = f"{recipe_name[:start]}{LEGACY_HARDWARE_ALIASES[match.group('hardware')]}{recipe_name[end:]}" + if available_benchmark_recipe_metadata(canonical_name) is None: + return recipe_name + # Every rank re-runs this lookup, so only the launcher and global rank 0 warn. + if os.environ.get("RANK", os.environ.get("SLURM_PROCID", "0")) == "0": + logger.warning("Recipe '%s' uses a deprecated hardware name; use '%s'.", recipe_name, canonical_name) + return canonical_name + + def resolved_benchmark_recipe_metadata(recipe_name: str) -> BenchmarkRecipeMetadata | None: - """Return benchmark metadata after applying unified lookup precedence.""" + """Return benchmark metadata after applying legacy hardware aliases and unified lookup precedence. + + A deprecated hardware name resolves to the renamed recipe, so callers load ``metadata.recipe_name``. + """ + recipe_name = _canonical_recipe_name(recipe_name) if recipe_name in LIBRARY_RECIPE_PRECEDENCE_COLLISIONS: return None return available_benchmark_recipe_metadata(recipe_name) diff --git a/scripts/training/recipe_runner.py b/scripts/training/recipe_runner.py index a22cd3a731..07e90d0fb7 100644 --- a/scripts/training/recipe_runner.py +++ b/scripts/training/recipe_runner.py @@ -233,7 +233,10 @@ def load_recipe( seq_length: int | None = None, ) -> ConfigContainer: """Load an exact benchmark recipe when exported, otherwise a library recipe.""" - if resolved_benchmark_recipe_metadata(recipe_name) is not None: + benchmark_metadata = resolved_benchmark_recipe_metadata(recipe_name) + if benchmark_metadata is not None: + # The resolved name replaces a deprecated hardware name in the requested one. + recipe_name = benchmark_metadata.recipe_name config_builder = find_benchmark_recipe(recipe_name) package_name = "megatron.bridge.perf_recipes" recipe_kind = "benchmark" diff --git a/scripts/training/setup_experiment.py b/scripts/training/setup_experiment.py index 9e76c66957..d801f0a2e1 100755 --- a/scripts/training/setup_experiment.py +++ b/scripts/training/setup_experiment.py @@ -126,7 +126,7 @@ def _build_parser() -> argparse.ArgumentParser: dest="peak_mem_clk", help=( "Lock the GPU memory clock to a fixed frequency in MHz once per node. " - "Defaults to 4752 for VR200 benchmark recipes and is disabled otherwise; pass -1 to disable the default." + "Defaults to 4752 for VRNVL72 benchmark recipes and is disabled otherwise; pass -1 to disable the default." ), ) execution.add_argument("--experiment-name", help="NeMo-Run experiment name.") @@ -218,12 +218,12 @@ def _resolve_peak_mem_clk( requested_peak_mem_clk: int | None, benchmark_metadata: BenchmarkRecipeMetadata | None, ) -> int | None: - """Resolve the explicit memory clock or the VR200 benchmark default.""" + """Resolve the explicit memory clock or the VRNVL72 benchmark default.""" if requested_peak_mem_clk == -1: return None if requested_peak_mem_clk is not None: return requested_peak_mem_clk - if benchmark_metadata is not None and benchmark_metadata.hardware == "vr200": + if benchmark_metadata is not None and benchmark_metadata.hardware == "vrnvl72": return 4752 return None diff --git a/src/megatron/bridge/perf_recipes/deepseek/__init__.py b/src/megatron/bridge/perf_recipes/deepseek/__init__.py index ddcef4b632..5d9c852e22 100644 --- a/src/megatron/bridge/perf_recipes/deepseek/__init__.py +++ b/src/megatron/bridge/perf_recipes/deepseek/__init__.py @@ -52,18 +52,18 @@ deepseek_v3_pretrain_1024gpu_h100_fp8sc_config, deepseek_v3_pretrain_1024gpu_h100_fp8sc_large_scale_config, ) -from megatron.bridge.perf_recipes.deepseek.vr200.deepseek_v3 import ( - deepseek_v3_pretrain_64gpu_vr200_fp8mx_proxy_config, - deepseek_v3_pretrain_64gpu_vr200_nvfp4_proxy_config, - deepseek_v3_pretrain_128gpu_vr200_bf16_config, - deepseek_v3_pretrain_128gpu_vr200_fp8cs_config, - deepseek_v3_pretrain_128gpu_vr200_fp8mx_config, - deepseek_v3_pretrain_128gpu_vr200_nvfp4_config, - deepseek_v3_pretrain_256gpu_vr200_bf16_config, - deepseek_v3_pretrain_256gpu_vr200_fp8cs_config, - deepseek_v3_pretrain_256gpu_vr200_fp8mx_config, - deepseek_v3_pretrain_256gpu_vr200_nvfp4_config, +from megatron.bridge.perf_recipes.deepseek.vrnvl72.deepseek_v3 import ( + deepseek_v3_pretrain_64gpu_vrnvl72_fp8mx_proxy_config, + deepseek_v3_pretrain_64gpu_vrnvl72_nvfp4_proxy_config, + deepseek_v3_pretrain_128gpu_vrnvl72_bf16_config, + deepseek_v3_pretrain_128gpu_vrnvl72_fp8cs_config, + deepseek_v3_pretrain_128gpu_vrnvl72_fp8mx_config, + deepseek_v3_pretrain_128gpu_vrnvl72_nvfp4_config, + deepseek_v3_pretrain_256gpu_vrnvl72_bf16_config, + deepseek_v3_pretrain_256gpu_vrnvl72_fp8cs_config, + deepseek_v3_pretrain_256gpu_vrnvl72_fp8mx_config, + deepseek_v3_pretrain_256gpu_vrnvl72_nvfp4_config, ) -from megatron.bridge.perf_recipes.deepseek.vr200.deepseek_v4 import ( - deepseek_v4_flash_pretrain_128gpu_vr200_fp8mx_config, +from megatron.bridge.perf_recipes.deepseek.vrnvl72.deepseek_v4 import ( + deepseek_v4_flash_pretrain_128gpu_vrnvl72_fp8mx_config, ) diff --git a/src/megatron/bridge/perf_recipes/deepseek/gb300/deepseek_v3.py b/src/megatron/bridge/perf_recipes/deepseek/gb300/deepseek_v3.py index 6568d0c558..a5bf28ec0b 100644 --- a/src/megatron/bridge/perf_recipes/deepseek/gb300/deepseek_v3.py +++ b/src/megatron/bridge/perf_recipes/deepseek/gb300/deepseek_v3.py @@ -29,7 +29,7 @@ def _build_deepseek_v3_gb300_bf16() -> ConfigContainer: - """Shared HybridEP BF16 base for the DeepSeek V3 256-GPU GB300 recipe and its VR200 alias.""" + """Shared HybridEP BF16 base for the DeepSeek V3 256-GPU GB300 recipe and its VRNVL72 alias.""" cfg = deepseek_v3_pretrain_config() cfg.mixed_precision = _perf_precision("bf16") _deepseek_v3_common(cfg) @@ -136,7 +136,7 @@ def deepseek_v3_pretrain_256gpu_gb300_fp8cs_config() -> ConfigContainer: def _build_deepseek_v3_gb300_fp8mx() -> ConfigContainer: - """Shared HybridEP MXFP8 base for the DeepSeek V3 256-GPU GB300 recipe and its VR200 alias.""" + """Shared HybridEP MXFP8 base for the DeepSeek V3 256-GPU GB300 recipe and its VRNVL72 alias.""" cfg = deepseek_v3_pretrain_config() cfg.mixed_precision = _perf_precision("fp8_mx") _deepseek_v3_common(cfg) @@ -198,7 +198,7 @@ def deepseek_v3_pretrain_256gpu_gb300_fp8mx_config() -> ConfigContainer: def _build_deepseek_v3_gb300_nvfp4() -> ConfigContainer: - """Shared HybridEP NVFP4 base for the DeepSeek V3 256-GPU GB300 recipe and its VR200 alias.""" + """Shared HybridEP NVFP4 base for the DeepSeek V3 256-GPU GB300 recipe and its VRNVL72 alias.""" cfg = deepseek_v3_pretrain_config() cfg.mixed_precision = _perf_precision("nvfp4") _deepseek_v3_common(cfg) diff --git a/src/megatron/bridge/perf_recipes/deepseek/vr200/__init__.py b/src/megatron/bridge/perf_recipes/deepseek/vrnvl72/__init__.py similarity index 100% rename from src/megatron/bridge/perf_recipes/deepseek/vr200/__init__.py rename to src/megatron/bridge/perf_recipes/deepseek/vrnvl72/__init__.py diff --git a/src/megatron/bridge/perf_recipes/deepseek/vr200/deepseek_v3.py b/src/megatron/bridge/perf_recipes/deepseek/vrnvl72/deepseek_v3.py similarity index 92% rename from src/megatron/bridge/perf_recipes/deepseek/vr200/deepseek_v3.py rename to src/megatron/bridge/perf_recipes/deepseek/vrnvl72/deepseek_v3.py index 98454b93cc..d48159ac96 100644 --- a/src/megatron/bridge/perf_recipes/deepseek/vr200/deepseek_v3.py +++ b/src/megatron/bridge/perf_recipes/deepseek/vrnvl72/deepseek_v3.py @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""VR200 performance recipes for DeepSeek V3.""" +"""VRNVL72 performance recipes for DeepSeek V3.""" from megatron.bridge.perf_recipes.deepseek.common import ( ConfigContainer, @@ -31,8 +31,8 @@ from megatron.bridge.perf_recipes.environment import COMMON_PERF_ENV_VARS -def deepseek_v3_pretrain_128gpu_vr200_bf16_config() -> ConfigContainer: - """DeepSeek V3 pretrain: 128× VR200, BF16.""" +def deepseek_v3_pretrain_128gpu_vrnvl72_bf16_config() -> ConfigContainer: + """DeepSeek V3 pretrain: 128× VRNVL72, BF16.""" cfg = deepseek_v3_pretrain_config() cfg.mixed_precision = _perf_precision("bf16") _deepseek_v3_common(cfg) @@ -82,8 +82,8 @@ def deepseek_v3_pretrain_128gpu_vr200_bf16_config() -> ConfigContainer: return cfg -def deepseek_v3_pretrain_128gpu_vr200_fp8cs_config() -> ConfigContainer: - """DeepSeek V3 pretrain: 128× VR200, FP8 current-scaling.""" +def deepseek_v3_pretrain_128gpu_vrnvl72_fp8cs_config() -> ConfigContainer: + """DeepSeek V3 pretrain: 128× VRNVL72, FP8 current-scaling.""" cfg = deepseek_v3_pretrain_config() cfg.mixed_precision = _perf_precision("fp8_cs") _deepseek_v3_common(cfg) @@ -133,8 +133,8 @@ def deepseek_v3_pretrain_128gpu_vr200_fp8cs_config() -> ConfigContainer: return cfg -def deepseek_v3_pretrain_128gpu_vr200_fp8mx_config() -> ConfigContainer: - """DeepSeek V3 pretrain: 128× VR200, MXFP8.""" +def deepseek_v3_pretrain_128gpu_vrnvl72_fp8mx_config() -> ConfigContainer: + """DeepSeek V3 pretrain: 128× VRNVL72, MXFP8.""" cfg = deepseek_v3_pretrain_config() cfg.mixed_precision = _perf_precision("fp8_mx") _deepseek_v3_common(cfg) @@ -189,8 +189,8 @@ def deepseek_v3_pretrain_128gpu_vr200_fp8mx_config() -> ConfigContainer: return cfg -def deepseek_v3_pretrain_128gpu_vr200_nvfp4_config() -> ConfigContainer: - """DeepSeek V3 pretrain: 128× VR200, NVFP4.""" +def deepseek_v3_pretrain_128gpu_vrnvl72_nvfp4_config() -> ConfigContainer: + """DeepSeek V3 pretrain: 128× VRNVL72, NVFP4.""" cfg = deepseek_v3_pretrain_config() cfg.mixed_precision = _perf_precision("nvfp4") _deepseek_v3_common(cfg) @@ -242,8 +242,8 @@ def deepseek_v3_pretrain_128gpu_vr200_nvfp4_config() -> ConfigContainer: return cfg -def deepseek_v3_pretrain_256gpu_vr200_bf16_config() -> ConfigContainer: - """DeepSeek V3 pretrain: 256× VR200, BF16 (alias of GB300).""" +def deepseek_v3_pretrain_256gpu_vrnvl72_bf16_config() -> ConfigContainer: + """DeepSeek V3 pretrain: 256× VRNVL72, BF16 (alias of GB300).""" cfg = _build_deepseek_v3_gb300_bf16() cfg.model.cuda_graph_scope = ["attn"] @@ -272,8 +272,8 @@ def deepseek_v3_pretrain_256gpu_vr200_bf16_config() -> ConfigContainer: return cfg -def deepseek_v3_pretrain_256gpu_vr200_fp8cs_config() -> ConfigContainer: - """DeepSeek V3 pretrain: 256× VR200, FP8-CS (alias of GB300).""" +def deepseek_v3_pretrain_256gpu_vrnvl72_fp8cs_config() -> ConfigContainer: + """DeepSeek V3 pretrain: 256× VRNVL72, FP8-CS (alias of GB300).""" cfg = deepseek_v3_pretrain_256gpu_gb300_fp8cs_config() # Keep process settings next to the recipe so users can see the exact benchmark environment. cfg.env_vars = { @@ -300,8 +300,8 @@ def deepseek_v3_pretrain_256gpu_vr200_fp8cs_config() -> ConfigContainer: return cfg -def deepseek_v3_pretrain_256gpu_vr200_fp8mx_config() -> ConfigContainer: - """DeepSeek V3 pretrain: 256× VR200, FP8-MX (alias of GB300).""" +def deepseek_v3_pretrain_256gpu_vrnvl72_fp8mx_config() -> ConfigContainer: + """DeepSeek V3 pretrain: 256× VRNVL72, FP8-MX (alias of GB300).""" cfg = _build_deepseek_v3_gb300_fp8mx() # Keep process settings next to the recipe so users can see the exact benchmark environment. cfg.env_vars = { @@ -333,8 +333,8 @@ def deepseek_v3_pretrain_256gpu_vr200_fp8mx_config() -> ConfigContainer: return cfg -def deepseek_v3_pretrain_64gpu_vr200_fp8mx_proxy_config() -> ConfigContainer: - """DeepSeek V3 MXFP8 debugging proxy: 13 decoder layers on 64 VR200 GPUs. +def deepseek_v3_pretrain_64gpu_vrnvl72_fp8mx_proxy_config() -> ConfigContainer: + """DeepSeek V3 MXFP8 debugging proxy: 13 decoder layers on 64 VRNVL72 GPUs. Keep GBS=4096, per-layer shapes, EP=32 and one MTP layer. PP=1 without virtual pipelining gives dense DP=64, expert DP=2 and 64 microbatches. @@ -342,7 +342,7 @@ def deepseek_v3_pretrain_64gpu_vr200_fp8mx_proxy_config() -> ConfigContainer: overlap path. This reduced-depth model does not reproduce at-scale pipeline traffic, convergence or memory use; GPU validation is required. """ - cfg = deepseek_v3_pretrain_256gpu_vr200_fp8mx_config() + cfg = deepseek_v3_pretrain_256gpu_vrnvl72_fp8mx_config() cfg.model.num_layers = 13 # Retain DeepSeek V3's three leading dense layers; shorten its MoE pattern. cfg.model.moe_layer_freq = [0] * 3 + [1] * (cfg.model.num_layers - 3) @@ -374,8 +374,8 @@ def deepseek_v3_pretrain_64gpu_vr200_fp8mx_proxy_config() -> ConfigContainer: return cfg -def deepseek_v3_pretrain_256gpu_vr200_nvfp4_config() -> ConfigContainer: - """DeepSeek V3 pretrain: 256× VR200, NVFP4 with full-iteration CUDA graph.""" +def deepseek_v3_pretrain_256gpu_vrnvl72_nvfp4_config() -> ConfigContainer: + """DeepSeek V3 pretrain: 256× VRNVL72, NVFP4 with full-iteration CUDA graph.""" cfg = _build_deepseek_v3_gb300_nvfp4() # Keep process settings next to the recipe so users can see the exact benchmark environment. @@ -408,8 +408,8 @@ def deepseek_v3_pretrain_256gpu_vr200_nvfp4_config() -> ConfigContainer: return cfg -def deepseek_v3_pretrain_64gpu_vr200_nvfp4_proxy_config() -> ConfigContainer: - """DeepSeek V3 NVFP4 debugging proxy: 13 decoder layers on 64 VR200 GPUs. +def deepseek_v3_pretrain_64gpu_vrnvl72_nvfp4_proxy_config() -> ConfigContainer: + """DeepSeek V3 NVFP4 debugging proxy: 13 decoder layers on 64 VRNVL72 GPUs. Keep GBS=4096, per-layer shapes, EP=32 and one MTP layer. PP=1 without virtual pipelining gives dense DP=64, expert DP=2 and 64 microbatches. @@ -417,7 +417,7 @@ def deepseek_v3_pretrain_64gpu_vr200_nvfp4_proxy_config() -> ConfigContainer: overlap path. Use this reduced-depth model for feature and kernel performance experiments, not convergence or at-scale acceptance. """ - cfg = deepseek_v3_pretrain_256gpu_vr200_nvfp4_config() + cfg = deepseek_v3_pretrain_256gpu_vrnvl72_nvfp4_config() cfg.model.num_layers = 13 cfg.model.moe_layer_freq = [0] * 3 + [1] * (cfg.model.num_layers - 3) cfg.model.pipeline_model_parallel_size = 1 diff --git a/src/megatron/bridge/perf_recipes/deepseek/vr200/deepseek_v4.py b/src/megatron/bridge/perf_recipes/deepseek/vrnvl72/deepseek_v4.py similarity index 87% rename from src/megatron/bridge/perf_recipes/deepseek/vr200/deepseek_v4.py rename to src/megatron/bridge/perf_recipes/deepseek/vrnvl72/deepseek_v4.py index 775ce8cbcf..1ed0d3bf3a 100644 --- a/src/megatron/bridge/perf_recipes/deepseek/vr200/deepseek_v4.py +++ b/src/megatron/bridge/perf_recipes/deepseek/vrnvl72/deepseek_v4.py @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""VR200 performance recipes for DeepSeek V4.""" +"""VRNVL72 performance recipes for DeepSeek V4.""" from megatron.bridge.perf_recipes.deepseek.gb300.deepseek_v4 import ( deepseek_v4_flash_pretrain_128gpu_gb300_fp8mx_config, @@ -20,8 +20,8 @@ from megatron.bridge.training.config import ConfigContainer -def deepseek_v4_flash_pretrain_128gpu_vr200_fp8mx_config() -> ConfigContainer: - """DeepSeek V4 Flash pretrain: 128× VR200, MXFP8 (alias of GB300).""" +def deepseek_v4_flash_pretrain_128gpu_vrnvl72_fp8mx_config() -> ConfigContainer: + """DeepSeek V4 Flash pretrain: 128× VRNVL72, MXFP8 (alias of GB300).""" cfg = deepseek_v4_flash_pretrain_128gpu_gb300_fp8mx_config() # Rubin's grouped GLU kernel does not support DeepSeek V4's SwiGLU clamp parameters. This is a @@ -30,7 +30,7 @@ def deepseek_v4_flash_pretrain_128gpu_vr200_fp8mx_config() -> ConfigContainer: cfg.model.use_transformer_engine_op_fuser = True cfg.model.moe_use_grouped_tensor = True - # Keep the VR200 launch environment explicit instead of inheriting it from GB300. + # Keep the VRNVL72 launch environment explicit instead of inheriting it from GB300. cfg.env_vars = { **COMMON_PERF_ENV_VARS, "CUDA_DEVICE_MAX_CONNECTIONS": 32, diff --git a/src/megatron/bridge/perf_recipes/gpt_oss/__init__.py b/src/megatron/bridge/perf_recipes/gpt_oss/__init__.py index 9b3352d7ab..f026e1b57d 100644 --- a/src/megatron/bridge/perf_recipes/gpt_oss/__init__.py +++ b/src/megatron/bridge/perf_recipes/gpt_oss/__init__.py @@ -28,10 +28,10 @@ gpt_oss_120b_pretrain_64gpu_h100_bf16_config, gpt_oss_120b_pretrain_64gpu_h100_fp8cs_config, ) -from megatron.bridge.perf_recipes.gpt_oss.vr200.gpt_oss import ( - gpt_oss_20b_pretrain_8gpu_vr200_fp8mx_config, - gpt_oss_20b_pretrain_8gpu_vr200_nvfp4_config, - gpt_oss_20b_pretrain_64gpu_vr200_nvfp4_config, - gpt_oss_120b_pretrain_64gpu_vr200_bf16_config, - gpt_oss_120b_pretrain_64gpu_vr200_fp8mx_config, +from megatron.bridge.perf_recipes.gpt_oss.vrnvl72.gpt_oss import ( + gpt_oss_20b_pretrain_8gpu_vrnvl72_fp8mx_config, + gpt_oss_20b_pretrain_8gpu_vrnvl72_nvfp4_config, + gpt_oss_20b_pretrain_64gpu_vrnvl72_nvfp4_config, + gpt_oss_120b_pretrain_64gpu_vrnvl72_bf16_config, + gpt_oss_120b_pretrain_64gpu_vrnvl72_fp8mx_config, ) diff --git a/src/megatron/bridge/perf_recipes/gpt_oss/gb300/gpt_oss.py b/src/megatron/bridge/perf_recipes/gpt_oss/gb300/gpt_oss.py index 472db4e2ce..dfcdec9064 100644 --- a/src/megatron/bridge/perf_recipes/gpt_oss/gb300/gpt_oss.py +++ b/src/megatron/bridge/perf_recipes/gpt_oss/gb300/gpt_oss.py @@ -216,7 +216,7 @@ def gpt_oss_120b_pretrain_64gpu_gb300_bf16_config() -> ConfigContainer: def _build_gpt_oss_120b_gb300_fp8mx() -> ConfigContainer: - """Shared HybridEP MXFP8 base for the GPT-OSS 120B GB300 recipe and its VR200 alias.""" + """Shared HybridEP MXFP8 base for the GPT-OSS 120B GB300 recipe and its VRNVL72 alias.""" cfg = gpt_oss_120b_pretrain_config() cfg.mixed_precision = _perf_precision("fp8_mx") cfg.model.moe_router_fusion = True diff --git a/src/megatron/bridge/perf_recipes/gpt_oss/vr200/__init__.py b/src/megatron/bridge/perf_recipes/gpt_oss/vrnvl72/__init__.py similarity index 100% rename from src/megatron/bridge/perf_recipes/gpt_oss/vr200/__init__.py rename to src/megatron/bridge/perf_recipes/gpt_oss/vrnvl72/__init__.py diff --git a/src/megatron/bridge/perf_recipes/gpt_oss/vr200/gpt_oss.py b/src/megatron/bridge/perf_recipes/gpt_oss/vrnvl72/gpt_oss.py similarity index 91% rename from src/megatron/bridge/perf_recipes/gpt_oss/vr200/gpt_oss.py rename to src/megatron/bridge/perf_recipes/gpt_oss/vrnvl72/gpt_oss.py index 7dc0e3985f..dbc5450e9c 100644 --- a/src/megatron/bridge/perf_recipes/gpt_oss/vr200/gpt_oss.py +++ b/src/megatron/bridge/perf_recipes/gpt_oss/vrnvl72/gpt_oss.py @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""VR200 performance recipes for GPT-OSS.""" +"""VRNVL72 performance recipes for GPT-OSS.""" from megatron.bridge.perf_recipes.environment import COMMON_PERF_ENV_VARS from megatron.bridge.perf_recipes.gpt_oss.common import ( @@ -30,8 +30,8 @@ ) -def gpt_oss_20b_pretrain_8gpu_vr200_nvfp4_config() -> ConfigContainer: - """GPT-OSS 20B pretrain: 8× VR200, NVFP4 (alias of GB300).""" +def gpt_oss_20b_pretrain_8gpu_vrnvl72_nvfp4_config() -> ConfigContainer: + """GPT-OSS 20B pretrain: 8× VRNVL72, NVFP4 (alias of GB300).""" cfg = gpt_oss_20b_pretrain_8gpu_gb300_nvfp4_config() # Keep process settings next to the recipe so users can see the exact benchmark environment. cfg.env_vars = { @@ -60,8 +60,8 @@ def gpt_oss_20b_pretrain_8gpu_vr200_nvfp4_config() -> ConfigContainer: return cfg -def gpt_oss_20b_pretrain_8gpu_vr200_fp8mx_config() -> ConfigContainer: - """GPT-OSS 20B pretrain: 8× VR200, MXFP8.""" +def gpt_oss_20b_pretrain_8gpu_vrnvl72_fp8mx_config() -> ConfigContainer: + """GPT-OSS 20B pretrain: 8× VRNVL72, MXFP8.""" cfg = gpt_oss_20b_pretrain_config() cfg.mixed_precision = _gpt_oss_20b_fp8mx_precision() @@ -108,8 +108,8 @@ def gpt_oss_20b_pretrain_8gpu_vr200_fp8mx_config() -> ConfigContainer: return cfg -def gpt_oss_20b_pretrain_64gpu_vr200_nvfp4_config() -> ConfigContainer: - """GPT-OSS 20B pretrain: 64× VR200, NVFP4.""" +def gpt_oss_20b_pretrain_64gpu_vrnvl72_nvfp4_config() -> ConfigContainer: + """GPT-OSS 20B pretrain: 64× VRNVL72, NVFP4.""" cfg = gpt_oss_20b_pretrain_config() cfg.mixed_precision = _gpt_oss_20b_nvfp4_precision() @@ -158,8 +158,8 @@ def gpt_oss_20b_pretrain_64gpu_vr200_nvfp4_config() -> ConfigContainer: return cfg -def gpt_oss_120b_pretrain_64gpu_vr200_bf16_config() -> ConfigContainer: - """GPT-OSS 120B pretrain: 64× VR200, BF16 (alias of GB300).""" +def gpt_oss_120b_pretrain_64gpu_vrnvl72_bf16_config() -> ConfigContainer: + """GPT-OSS 120B pretrain: 64× VRNVL72, BF16 (alias of GB300).""" cfg = gpt_oss_120b_pretrain_64gpu_gb300_bf16_config() # Keep process settings next to the recipe so users can see the exact benchmark environment. cfg.env_vars = { @@ -179,8 +179,8 @@ def gpt_oss_120b_pretrain_64gpu_vr200_bf16_config() -> ConfigContainer: return cfg -def gpt_oss_120b_pretrain_64gpu_vr200_fp8mx_config() -> ConfigContainer: - """GPT-OSS 120B pretrain: 64× VR200, FP8-MX (alias of GB300).""" +def gpt_oss_120b_pretrain_64gpu_vrnvl72_fp8mx_config() -> ConfigContainer: + """GPT-OSS 120B pretrain: 64× VRNVL72, FP8-MX (alias of GB300).""" cfg = _build_gpt_oss_120b_gb300_fp8mx() # Keep process settings next to the recipe so users can see the exact benchmark environment. cfg.env_vars = { diff --git a/src/megatron/bridge/perf_recipes/kimi/__init__.py b/src/megatron/bridge/perf_recipes/kimi/__init__.py index 88e814b1ac..31f53470d3 100644 --- a/src/megatron/bridge/perf_recipes/kimi/__init__.py +++ b/src/megatron/bridge/perf_recipes/kimi/__init__.py @@ -24,7 +24,7 @@ kimi_k2_pretrain_1024gpu_h100_fp8cs_config, kimi_k2_pretrain_1024gpu_h100_fp8sc_config, ) -from megatron.bridge.perf_recipes.kimi.vr200.kimi_k2 import ( - kimi_k2_pretrain_256gpu_vr200_bf16_config, - kimi_k2_pretrain_256gpu_vr200_fp8mx_config, +from megatron.bridge.perf_recipes.kimi.vrnvl72.kimi_k2 import ( + kimi_k2_pretrain_256gpu_vrnvl72_bf16_config, + kimi_k2_pretrain_256gpu_vrnvl72_fp8mx_config, ) diff --git a/src/megatron/bridge/perf_recipes/kimi/gb300/kimi_k2.py b/src/megatron/bridge/perf_recipes/kimi/gb300/kimi_k2.py index cfcbf9ac83..a41d5c916b 100644 --- a/src/megatron/bridge/perf_recipes/kimi/gb300/kimi_k2.py +++ b/src/megatron/bridge/perf_recipes/kimi/gb300/kimi_k2.py @@ -137,7 +137,7 @@ def kimi_k2_pretrain_256gpu_gb300_fp8cs_config() -> ConfigContainer: def _build_kimi_k2_gb300_fp8mx() -> ConfigContainer: - """Shared HybridEP MXFP8 base for the Kimi K2 GB300 recipe and its VR200 alias.""" + """Shared HybridEP MXFP8 base for the Kimi K2 GB300 recipe and its VRNVL72 alias.""" cfg = kimi_k2_pretrain_config() cfg.mixed_precision = _perf_precision("fp8_mx") cfg.mixed_precision.reuse_grad_buf_for_mxfp8_param_ag = False diff --git a/src/megatron/bridge/perf_recipes/kimi/vr200/__init__.py b/src/megatron/bridge/perf_recipes/kimi/vrnvl72/__init__.py similarity index 100% rename from src/megatron/bridge/perf_recipes/kimi/vr200/__init__.py rename to src/megatron/bridge/perf_recipes/kimi/vrnvl72/__init__.py diff --git a/src/megatron/bridge/perf_recipes/kimi/vr200/kimi_k2.py b/src/megatron/bridge/perf_recipes/kimi/vrnvl72/kimi_k2.py similarity index 90% rename from src/megatron/bridge/perf_recipes/kimi/vr200/kimi_k2.py rename to src/megatron/bridge/perf_recipes/kimi/vrnvl72/kimi_k2.py index 6245b38773..208168dda5 100644 --- a/src/megatron/bridge/perf_recipes/kimi/vr200/kimi_k2.py +++ b/src/megatron/bridge/perf_recipes/kimi/vrnvl72/kimi_k2.py @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""VR200 performance recipes for Kimi K2.""" +"""VRNVL72 performance recipes for Kimi K2.""" from megatron.bridge.perf_recipes.environment import COMMON_PERF_ENV_VARS from megatron.bridge.perf_recipes.kimi.common import ( @@ -23,8 +23,8 @@ ) -def kimi_k2_pretrain_256gpu_vr200_bf16_config() -> ConfigContainer: - """Kimi K2 pretrain: 256× VR200, BF16 (alias of GB300).""" +def kimi_k2_pretrain_256gpu_vrnvl72_bf16_config() -> ConfigContainer: + """Kimi K2 pretrain: 256× VRNVL72, BF16 (alias of GB300).""" cfg = kimi_k2_pretrain_256gpu_gb300_bf16_config() # Keep process settings next to the recipe so users can see the exact benchmark environment. cfg.env_vars = { @@ -49,8 +49,8 @@ def kimi_k2_pretrain_256gpu_vr200_bf16_config() -> ConfigContainer: return cfg -def kimi_k2_pretrain_256gpu_vr200_fp8mx_config() -> ConfigContainer: - """Kimi K2 pretrain: 256× VR200, MXFP8 (alias of GB300).""" +def kimi_k2_pretrain_256gpu_vrnvl72_fp8mx_config() -> ConfigContainer: + """Kimi K2 pretrain: 256× VRNVL72, MXFP8 (alias of GB300).""" cfg = _build_kimi_k2_gb300_fp8mx() # Keep process settings next to the recipe so users can see the exact benchmark environment. cfg.env_vars = { diff --git a/src/megatron/bridge/perf_recipes/llama/__init__.py b/src/megatron/bridge/perf_recipes/llama/__init__.py index 8e46a39def..1f0e28d86c 100644 --- a/src/megatron/bridge/perf_recipes/llama/__init__.py +++ b/src/megatron/bridge/perf_recipes/llama/__init__.py @@ -137,17 +137,17 @@ llama3_8b_pretrain_8gpu_r100_fp8mx_config, llama3_8b_pretrain_8gpu_r100_nvfp4_config, ) -from megatron.bridge.perf_recipes.llama.vr200.llama3 import ( - llama3_8b_pretrain_8gpu_vr200_bf16_config, - llama3_8b_pretrain_8gpu_vr200_fp8cs_config, - llama3_8b_pretrain_8gpu_vr200_fp8mx_config, - llama3_8b_pretrain_8gpu_vr200_nvfp4_config, - llama3_70b_pretrain_64gpu_vr200_bf16_config, - llama3_70b_pretrain_64gpu_vr200_fp8mx_config, - llama3_70b_pretrain_64gpu_vr200_nvfp4_config, +from megatron.bridge.perf_recipes.llama.vrnvl72.llama3 import ( + llama3_8b_pretrain_8gpu_vrnvl72_bf16_config, + llama3_8b_pretrain_8gpu_vrnvl72_fp8cs_config, + llama3_8b_pretrain_8gpu_vrnvl72_fp8mx_config, + llama3_8b_pretrain_8gpu_vrnvl72_nvfp4_config, + llama3_70b_pretrain_64gpu_vrnvl72_bf16_config, + llama3_70b_pretrain_64gpu_vrnvl72_fp8mx_config, + llama3_70b_pretrain_64gpu_vrnvl72_nvfp4_config, ) -from megatron.bridge.perf_recipes.llama.vr200.llama31 import ( - llama31_405b_pretrain_256gpu_vr200_bf16_config, - llama31_405b_pretrain_256gpu_vr200_fp8mx_config, - llama31_405b_pretrain_256gpu_vr200_nvfp4_config, +from megatron.bridge.perf_recipes.llama.vrnvl72.llama31 import ( + llama31_405b_pretrain_256gpu_vrnvl72_bf16_config, + llama31_405b_pretrain_256gpu_vrnvl72_fp8mx_config, + llama31_405b_pretrain_256gpu_vrnvl72_nvfp4_config, ) diff --git a/src/megatron/bridge/perf_recipes/llama/vr200/__init__.py b/src/megatron/bridge/perf_recipes/llama/vrnvl72/__init__.py similarity index 100% rename from src/megatron/bridge/perf_recipes/llama/vr200/__init__.py rename to src/megatron/bridge/perf_recipes/llama/vrnvl72/__init__.py diff --git a/src/megatron/bridge/perf_recipes/llama/vr200/llama3.py b/src/megatron/bridge/perf_recipes/llama/vrnvl72/llama3.py similarity index 87% rename from src/megatron/bridge/perf_recipes/llama/vr200/llama3.py rename to src/megatron/bridge/perf_recipes/llama/vrnvl72/llama3.py index 4cea157b66..b18b26026b 100644 --- a/src/megatron/bridge/perf_recipes/llama/vr200/llama3.py +++ b/src/megatron/bridge/perf_recipes/llama/vrnvl72/llama3.py @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""VR200 performance recipes for Llama 3.""" +"""VRNVL72 performance recipes for Llama 3.""" from megatron.bridge.perf_recipes.environment import COMMON_PERF_ENV_VARS from megatron.bridge.perf_recipes.llama.common import ( @@ -28,8 +28,8 @@ ) -def llama3_8b_pretrain_8gpu_vr200_bf16_config() -> ConfigContainer: - """LLaMA 3 8B pretrain: 8× VR200, BF16 (alias of GB300).""" +def llama3_8b_pretrain_8gpu_vrnvl72_bf16_config() -> ConfigContainer: + """LLaMA 3 8B pretrain: 8× VRNVL72, BF16 (alias of GB300).""" cfg = llama3_8b_pretrain_8gpu_gb300_bf16_config() # Keep process settings next to the recipe so users can see the exact benchmark environment. cfg.env_vars = { @@ -49,8 +49,8 @@ def llama3_8b_pretrain_8gpu_vr200_bf16_config() -> ConfigContainer: return cfg -def llama3_8b_pretrain_8gpu_vr200_fp8cs_config() -> ConfigContainer: - """LLaMA 3 8B pretrain: 8× VR200, FP8-CS (alias of GB300).""" +def llama3_8b_pretrain_8gpu_vrnvl72_fp8cs_config() -> ConfigContainer: + """LLaMA 3 8B pretrain: 8× VRNVL72, FP8-CS (alias of GB300).""" cfg = llama3_8b_pretrain_8gpu_gb300_fp8cs_config() # Keep process settings next to the recipe so users can see the exact benchmark environment. cfg.env_vars = { @@ -70,8 +70,8 @@ def llama3_8b_pretrain_8gpu_vr200_fp8cs_config() -> ConfigContainer: return cfg -def llama3_8b_pretrain_8gpu_vr200_fp8mx_config() -> ConfigContainer: - """LLaMA 3 8B pretrain: 8× VR200, FP8-MX (alias of GB300).""" +def llama3_8b_pretrain_8gpu_vrnvl72_fp8mx_config() -> ConfigContainer: + """LLaMA 3 8B pretrain: 8× VRNVL72, FP8-MX (alias of GB300).""" cfg = llama3_8b_pretrain_8gpu_gb300_fp8mx_config() # Keep process settings next to the recipe so users can see the exact benchmark environment. cfg.env_vars = { @@ -91,8 +91,8 @@ def llama3_8b_pretrain_8gpu_vr200_fp8mx_config() -> ConfigContainer: return cfg -def llama3_8b_pretrain_8gpu_vr200_nvfp4_config() -> ConfigContainer: - """LLaMA 3 8B pretrain: 8× VR200, NVFP4 (alias of GB300).""" +def llama3_8b_pretrain_8gpu_vrnvl72_nvfp4_config() -> ConfigContainer: + """LLaMA 3 8B pretrain: 8× VRNVL72, NVFP4 (alias of GB300).""" cfg = llama3_8b_pretrain_8gpu_gb300_nvfp4_config() # Keep process settings next to the recipe so users can see the exact benchmark environment. cfg.env_vars = { @@ -114,8 +114,8 @@ def llama3_8b_pretrain_8gpu_vr200_nvfp4_config() -> ConfigContainer: return cfg -def llama3_70b_pretrain_64gpu_vr200_bf16_config() -> ConfigContainer: - """LLaMA 3 70B pretrain: 64× VR200, BF16 (alias of GB300).""" +def llama3_70b_pretrain_64gpu_vrnvl72_bf16_config() -> ConfigContainer: + """LLaMA 3 70B pretrain: 64× VRNVL72, BF16 (alias of GB300).""" cfg = llama3_70b_pretrain_64gpu_gb300_bf16_config() # Keep process settings next to the recipe so users can see the exact benchmark environment. cfg.env_vars = { @@ -137,8 +137,8 @@ def llama3_70b_pretrain_64gpu_vr200_bf16_config() -> ConfigContainer: return cfg -def llama3_70b_pretrain_64gpu_vr200_fp8mx_config() -> ConfigContainer: - """LLaMA 3 70B pretrain: 64× VR200, FP8-MX (alias of GB300).""" +def llama3_70b_pretrain_64gpu_vrnvl72_fp8mx_config() -> ConfigContainer: + """LLaMA 3 70B pretrain: 64× VRNVL72, FP8-MX (alias of GB300).""" cfg = llama3_70b_pretrain_64gpu_gb300_fp8mx_config() # Keep process settings next to the recipe so users can see the exact benchmark environment. cfg.env_vars = { @@ -160,8 +160,8 @@ def llama3_70b_pretrain_64gpu_vr200_fp8mx_config() -> ConfigContainer: return cfg -def llama3_70b_pretrain_64gpu_vr200_nvfp4_config() -> ConfigContainer: - """LLaMA 3 70B pretrain: 64× VR200, NVFP4 (alias of GB300).""" +def llama3_70b_pretrain_64gpu_vrnvl72_nvfp4_config() -> ConfigContainer: + """LLaMA 3 70B pretrain: 64× VRNVL72, NVFP4 (alias of GB300).""" cfg = llama3_70b_pretrain_64gpu_gb300_nvfp4_config() # Keep process settings next to the recipe so users can see the exact benchmark environment. cfg.env_vars = { diff --git a/src/megatron/bridge/perf_recipes/llama/vr200/llama31.py b/src/megatron/bridge/perf_recipes/llama/vrnvl72/llama31.py similarity index 87% rename from src/megatron/bridge/perf_recipes/llama/vr200/llama31.py rename to src/megatron/bridge/perf_recipes/llama/vrnvl72/llama31.py index c82a136981..fb5a5f383b 100644 --- a/src/megatron/bridge/perf_recipes/llama/vr200/llama31.py +++ b/src/megatron/bridge/perf_recipes/llama/vrnvl72/llama31.py @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""VR200 performance recipes for Llama 3.1.""" +"""VRNVL72 performance recipes for Llama 3.1.""" from megatron.bridge.perf_recipes.environment import COMMON_PERF_ENV_VARS from megatron.bridge.perf_recipes.llama.common import ( @@ -24,8 +24,8 @@ ) -def llama31_405b_pretrain_256gpu_vr200_bf16_config() -> ConfigContainer: - """Llama3.1 405B pretrain: 256x VR200, BF16 (alias of GB300).""" +def llama31_405b_pretrain_256gpu_vrnvl72_bf16_config() -> ConfigContainer: + """Llama3.1 405B pretrain: 256x VRNVL72, BF16 (alias of GB300).""" cfg = llama31_405b_pretrain_256gpu_gb300_bf16_config() # Keep process settings next to the recipe so users can see the exact benchmark environment. cfg.env_vars = { @@ -43,8 +43,8 @@ def llama31_405b_pretrain_256gpu_vr200_bf16_config() -> ConfigContainer: return cfg -def llama31_405b_pretrain_256gpu_vr200_fp8mx_config() -> ConfigContainer: - """Llama3.1 405B pretrain: 256x VR200, FP8-MX (alias of GB300).""" +def llama31_405b_pretrain_256gpu_vrnvl72_fp8mx_config() -> ConfigContainer: + """Llama3.1 405B pretrain: 256x VRNVL72, FP8-MX (alias of GB300).""" cfg = llama31_405b_pretrain_256gpu_gb300_fp8mx_config() # Keep process settings next to the recipe so users can see the exact benchmark environment. cfg.env_vars = { @@ -66,8 +66,8 @@ def llama31_405b_pretrain_256gpu_vr200_fp8mx_config() -> ConfigContainer: return cfg -def llama31_405b_pretrain_256gpu_vr200_nvfp4_config() -> ConfigContainer: - """Llama3.1 405B pretrain: 256x VR200, NVFP4 (alias of GB300).""" +def llama31_405b_pretrain_256gpu_vrnvl72_nvfp4_config() -> ConfigContainer: + """Llama3.1 405B pretrain: 256x VRNVL72, NVFP4 (alias of GB300).""" cfg = llama31_405b_pretrain_256gpu_gb300_nvfp4_config() # Keep process settings next to the recipe so users can see the exact benchmark environment. cfg.env_vars = { diff --git a/src/megatron/bridge/perf_recipes/nemotronh/__init__.py b/src/megatron/bridge/perf_recipes/nemotronh/__init__.py index 46c29d69bb..6ef1d112d1 100644 --- a/src/megatron/bridge/perf_recipes/nemotronh/__init__.py +++ b/src/megatron/bridge/perf_recipes/nemotronh/__init__.py @@ -55,15 +55,15 @@ nemotron_3_nano_pretrain_16gpu_h100_fp8cs_config, nemotron_3_super_pretrain_64gpu_h100_bf16_config, ) -from megatron.bridge.perf_recipes.nemotronh.vr200.nemotronh import ( - nemotron_3_5_lightning_pretrain_8gpu_vr200_bf16_config, - nemotron_3_5_lightning_pretrain_8gpu_vr200_fp8mx_config, - nemotron_3_nano_pretrain_8gpu_vr200_bf16_config, - nemotron_3_nano_pretrain_8gpu_vr200_fp8mx_config, - nemotron_3_nano_pretrain_8gpu_vr200_nvfp4_config, - nemotron_3_super_pretrain_64gpu_vr200_bf16_config, - nemotron_3_super_pretrain_64gpu_vr200_fp8mx_config, - nemotron_3_super_pretrain_64gpu_vr200_nvfp4_config, - nemotron_3_ultra_pretrain_256gpu_vr200_fp8mx_config, - nemotron_3_ultra_pretrain_256gpu_vr200_nvfp4_config, +from megatron.bridge.perf_recipes.nemotronh.vrnvl72.nemotronh import ( + nemotron_3_5_lightning_pretrain_8gpu_vrnvl72_bf16_config, + nemotron_3_5_lightning_pretrain_8gpu_vrnvl72_fp8mx_config, + nemotron_3_nano_pretrain_8gpu_vrnvl72_bf16_config, + nemotron_3_nano_pretrain_8gpu_vrnvl72_fp8mx_config, + nemotron_3_nano_pretrain_8gpu_vrnvl72_nvfp4_config, + nemotron_3_super_pretrain_64gpu_vrnvl72_bf16_config, + nemotron_3_super_pretrain_64gpu_vrnvl72_fp8mx_config, + nemotron_3_super_pretrain_64gpu_vrnvl72_nvfp4_config, + nemotron_3_ultra_pretrain_256gpu_vrnvl72_fp8mx_config, + nemotron_3_ultra_pretrain_256gpu_vrnvl72_nvfp4_config, ) diff --git a/src/megatron/bridge/perf_recipes/nemotronh/gb300/nemotronh.py b/src/megatron/bridge/perf_recipes/nemotronh/gb300/nemotronh.py index 2a751806aa..481814c27f 100644 --- a/src/megatron/bridge/perf_recipes/nemotronh/gb300/nemotronh.py +++ b/src/megatron/bridge/perf_recipes/nemotronh/gb300/nemotronh.py @@ -42,7 +42,7 @@ def _build_nemotron_3_super_gb300_bf16() -> ConfigContainer: - """Shared HybridEP BF16 base for the Nemotron 3 Super GB300 recipe and its VR200 alias.""" + """Shared HybridEP BF16 base for the Nemotron 3 Super GB300 recipe and its VRNVL72 alias.""" cfg = nemotron_3_super_pretrain_config() cfg.mixed_precision = _perf_precision("bf16") @@ -149,7 +149,7 @@ def nemotron_3_super_pretrain_64gpu_gb300_fp8mx_config() -> ConfigContainer: def _build_nemotron_3_super_gb300_nvfp4() -> ConfigContainer: - """Shared HybridEP NVFP4 base for the Nemotron 3 Super GB300 recipe and its VR200 alias.""" + """Shared HybridEP NVFP4 base for the Nemotron 3 Super GB300 recipe and its VRNVL72 alias.""" cfg = nemotron_3_super_pretrain_config() cfg.mixed_precision = _nemotron_3_super_nvfp4_precision() @@ -395,7 +395,7 @@ def nemotron_3_ultra_pretrain_256gpu_gb300_nvfp4_config(*, num_gpus: int = 256) def _build_nemotron_3_nano_gb300_bf16() -> ConfigContainer: - """Shared HybridEP BF16 base for the Nemotron 3 Nano GB300 recipe and its VR200 alias.""" + """Shared HybridEP BF16 base for the Nemotron 3 Nano GB300 recipe and its VRNVL72 alias.""" cfg = nemotron_3_nano_pretrain_config() _apply_nemotron_3_nano_perf_defaults(cfg) cfg.mixed_precision = _perf_precision("bf16") @@ -568,7 +568,7 @@ def nemotron_3_nano_pretrain_8gpu_gb300_nvfp4_config() -> ConfigContainer: def _build_nemotron_3_5_lightning_gb300_bf16() -> ConfigContainer: - """Shared HybridEP BF16 base for the Nemotron 3.5 Lightning GB300 recipe and its VR200 alias.""" + """Shared HybridEP BF16 base for the Nemotron 3.5 Lightning GB300 recipe and its VRNVL72 alias.""" cfg = _build_nemotron_3_nano_gb300_bf16() cfg.model.mtp_num_layers = 2 cfg.model.mtp_hybrid_override_pattern = "*E" diff --git a/src/megatron/bridge/perf_recipes/nemotronh/vr200/__init__.py b/src/megatron/bridge/perf_recipes/nemotronh/vrnvl72/__init__.py similarity index 100% rename from src/megatron/bridge/perf_recipes/nemotronh/vr200/__init__.py rename to src/megatron/bridge/perf_recipes/nemotronh/vrnvl72/__init__.py diff --git a/src/megatron/bridge/perf_recipes/nemotronh/vr200/nemotronh.py b/src/megatron/bridge/perf_recipes/nemotronh/vrnvl72/nemotronh.py similarity index 87% rename from src/megatron/bridge/perf_recipes/nemotronh/vr200/nemotronh.py rename to src/megatron/bridge/perf_recipes/nemotronh/vrnvl72/nemotronh.py index ee957c0c3e..bfb03ff6bb 100644 --- a/src/megatron/bridge/perf_recipes/nemotronh/vr200/nemotronh.py +++ b/src/megatron/bridge/perf_recipes/nemotronh/vrnvl72/nemotronh.py @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""VR200 performance recipes for Nemotron 3 and 3.5.""" +"""VRNVL72 performance recipes for Nemotron 3 and 3.5.""" from megatron.bridge.perf_recipes.environment import COMMON_PERF_ENV_VARS from megatron.bridge.perf_recipes.nemotronh.common import ( @@ -32,8 +32,8 @@ ) -def nemotron_3_nano_pretrain_8gpu_vr200_bf16_config() -> ConfigContainer: - """Nemotron 3 Nano pretrain: 8× VR200, BF16 (alias of GB300).""" +def nemotron_3_nano_pretrain_8gpu_vrnvl72_bf16_config() -> ConfigContainer: + """Nemotron 3 Nano pretrain: 8× VRNVL72, BF16 (alias of GB300).""" cfg = _build_nemotron_3_nano_gb300_bf16() # Keep process settings next to the recipe so users can see the exact benchmark environment. cfg.env_vars = { @@ -61,8 +61,8 @@ def nemotron_3_nano_pretrain_8gpu_vr200_bf16_config() -> ConfigContainer: return cfg -def nemotron_3_nano_pretrain_8gpu_vr200_fp8mx_config() -> ConfigContainer: - """Nemotron 3 Nano pretrain: 8× VR200, FP8-MX (alias of GB300).""" +def nemotron_3_nano_pretrain_8gpu_vrnvl72_fp8mx_config() -> ConfigContainer: + """Nemotron 3 Nano pretrain: 8× VRNVL72, FP8-MX (alias of GB300).""" cfg = _build_nemotron_3_nano_gb300_mxfp8() cfg.model.use_transformer_engine_op_fuser = True cfg.model.moe_mlp_glu_interleave_size = 32 @@ -95,8 +95,8 @@ def nemotron_3_nano_pretrain_8gpu_vr200_fp8mx_config() -> ConfigContainer: return cfg -def nemotron_3_nano_pretrain_8gpu_vr200_nvfp4_config() -> ConfigContainer: - """Nemotron 3 Nano pretrain: 8× VR200, NVFP4 (alias of GB300).""" +def nemotron_3_nano_pretrain_8gpu_vrnvl72_nvfp4_config() -> ConfigContainer: + """Nemotron 3 Nano pretrain: 8× VRNVL72, NVFP4 (alias of GB300).""" cfg = nemotron_3_nano_pretrain_8gpu_gb300_nvfp4_config() # Keep process settings next to the recipe so users can see the exact benchmark environment. cfg.env_vars = { @@ -126,8 +126,8 @@ def nemotron_3_nano_pretrain_8gpu_vr200_nvfp4_config() -> ConfigContainer: return cfg -def nemotron_3_super_pretrain_64gpu_vr200_bf16_config() -> ConfigContainer: - """Nemotron 3 Super pretrain: 64× VR200, BF16 (alias of GB300).""" +def nemotron_3_super_pretrain_64gpu_vrnvl72_bf16_config() -> ConfigContainer: + """Nemotron 3 Super pretrain: 64× VRNVL72, BF16 (alias of GB300).""" cfg = _build_nemotron_3_super_gb300_bf16() # Keep process settings next to the recipe so users can see the exact benchmark environment. cfg.env_vars = { @@ -152,8 +152,8 @@ def nemotron_3_super_pretrain_64gpu_vr200_bf16_config() -> ConfigContainer: return cfg -def nemotron_3_super_pretrain_64gpu_vr200_fp8mx_config() -> ConfigContainer: - """Nemotron 3 Super pretrain: 64× VR200, MXFP8 with full-iteration CUDA graph.""" +def nemotron_3_super_pretrain_64gpu_vrnvl72_fp8mx_config() -> ConfigContainer: + """Nemotron 3 Super pretrain: 64× VRNVL72, MXFP8 with full-iteration CUDA graph.""" cfg = _build_nemotron_3_super_gb300_mxfp8() cfg.mixed_precision.fp8_dot_product_attention = True cfg.model.expert_model_parallel_size = 8 @@ -183,8 +183,8 @@ def nemotron_3_super_pretrain_64gpu_vr200_fp8mx_config() -> ConfigContainer: return cfg -def nemotron_3_super_pretrain_64gpu_vr200_nvfp4_config() -> ConfigContainer: - """Nemotron 3 Super pretrain: 64× VR200, NVFP4 with full-iteration CUDA graph.""" +def nemotron_3_super_pretrain_64gpu_vrnvl72_nvfp4_config() -> ConfigContainer: + """Nemotron 3 Super pretrain: 64× VRNVL72, NVFP4 with full-iteration CUDA graph.""" cfg = _build_nemotron_3_super_gb300_nvfp4() cfg.model.expert_model_parallel_size = 16 @@ -217,8 +217,8 @@ def nemotron_3_super_pretrain_64gpu_vr200_nvfp4_config() -> ConfigContainer: return cfg -def nemotron_3_ultra_pretrain_256gpu_vr200_fp8mx_config(*, num_gpus: int = 256) -> ConfigContainer: - """Nemotron 3 Ultra pretrain: 256× VR200, MXFP8 (alias of GB300). +def nemotron_3_ultra_pretrain_256gpu_vrnvl72_fp8mx_config(*, num_gpus: int = 256) -> ConfigContainer: + """Nemotron 3 Ultra pretrain: 256× VRNVL72, MXFP8 (alias of GB300). Args: num_gpus: Launch GPU count used to size HSDP optimizer instances. @@ -248,7 +248,7 @@ def nemotron_3_ultra_pretrain_256gpu_vr200_fp8mx_config(*, num_gpus: int = 256) # Transformer Engine overlap settings for this model. "NVTE_BWD_LAYERNORM_SM_MARGIN": 20, "NVTE_FWD_LAYERNORM_SM_MARGIN": 20, - # Use cuDNN normalization kernels for the VR200 performance candidate. + # Use cuDNN normalization kernels for the VRNVL72 performance candidate. "NVTE_NORM_BWD_USE_CUDNN": 1, "NVTE_NORM_FWD_USE_CUDNN": 1, # Required by fine-grained activation offloading to avoid offloading weights. @@ -259,8 +259,8 @@ def nemotron_3_ultra_pretrain_256gpu_vr200_fp8mx_config(*, num_gpus: int = 256) return cfg -def nemotron_3_ultra_pretrain_256gpu_vr200_nvfp4_config(*, num_gpus: int = 256) -> ConfigContainer: - """Nemotron 3 Ultra pretrain: 256× VR200, NVFP4 (alias of GB300). +def nemotron_3_ultra_pretrain_256gpu_vrnvl72_nvfp4_config(*, num_gpus: int = 256) -> ConfigContainer: + """Nemotron 3 Ultra pretrain: 256× VRNVL72, NVFP4 (alias of GB300). Args: num_gpus: Launch GPU count used to size HSDP optimizer instances. @@ -286,7 +286,7 @@ def nemotron_3_ultra_pretrain_256gpu_vr200_nvfp4_config(*, num_gpus: int = 256) # Transformer Engine overlap settings for this model. "NVTE_BWD_LAYERNORM_SM_MARGIN": 20, "NVTE_FWD_LAYERNORM_SM_MARGIN": 20, - # Use cuDNN normalization kernels for the VR200 performance candidate. + # Use cuDNN normalization kernels for the VRNVL72 performance candidate. "NVTE_NORM_BWD_USE_CUDNN": 1, "NVTE_NORM_FWD_USE_CUDNN": 1, # Required by fine-grained activation offloading to avoid offloading weights. @@ -299,8 +299,8 @@ def nemotron_3_ultra_pretrain_256gpu_vr200_nvfp4_config(*, num_gpus: int = 256) return cfg -def nemotron_3_5_lightning_pretrain_8gpu_vr200_bf16_config() -> ConfigContainer: - """Nemotron 3.5 Lightning pretrain: 8× VR200, BF16 (alias of GB300).""" +def nemotron_3_5_lightning_pretrain_8gpu_vrnvl72_bf16_config() -> ConfigContainer: + """Nemotron 3.5 Lightning pretrain: 8× VRNVL72, BF16 (alias of GB300).""" cfg = _build_nemotron_3_5_lightning_gb300_bf16() # Offload MoE expert activations to host memory: the current Rubin base image ships a Transformer # Engine without TE PR #3273, whose fused cross entropy holds an extra fp32 gradient per loss head. @@ -309,7 +309,7 @@ def nemotron_3_5_lightning_pretrain_8gpu_vr200_bf16_config() -> ConfigContainer: cfg.model.fine_grained_activation_offloading = True cfg.model.offload_modules = ["expert_fc1", "moe_act"] - # Keep the VR200 launch environment explicit instead of inheriting it from GB300. + # Keep the VRNVL72 launch environment explicit instead of inheriting it from GB300. cfg.env_vars = { **COMMON_PERF_ENV_VARS, "CUDA_DEVICE_MAX_CONNECTIONS": 32, @@ -330,15 +330,15 @@ def nemotron_3_5_lightning_pretrain_8gpu_vr200_bf16_config() -> ConfigContainer: return cfg -def nemotron_3_5_lightning_pretrain_8gpu_vr200_fp8mx_config() -> ConfigContainer: - """Nemotron 3.5 Lightning pretrain: 8× VR200, MXFP8 with full-iteration CUDA graph.""" +def nemotron_3_5_lightning_pretrain_8gpu_vrnvl72_fp8mx_config() -> ConfigContainer: + """Nemotron 3.5 Lightning pretrain: 8× VRNVL72, MXFP8 with full-iteration CUDA graph.""" cfg = _build_nemotron_3_5_lightning_gb300_mxfp8() cfg.model.recompute_modules = [] cfg.model.use_transformer_engine_op_fuser = True cfg.mixed_precision.fp8_dot_product_attention = True _enable_nemotron_3_5_lightning_full_iteration(cfg) - # Keep the VR200 launch environment explicit instead of inheriting it from GB300. + # Keep the VRNVL72 launch environment explicit instead of inheriting it from GB300. cfg.env_vars = { **COMMON_PERF_ENV_VARS, "CUDA_DEVICE_MAX_CONNECTIONS": 32, diff --git a/src/megatron/bridge/perf_recipes/qwen/__init__.py b/src/megatron/bridge/perf_recipes/qwen/__init__.py index 75eb5edc42..f6b86289ea 100644 --- a/src/megatron/bridge/perf_recipes/qwen/__init__.py +++ b/src/megatron/bridge/perf_recipes/qwen/__init__.py @@ -97,11 +97,11 @@ qwen3_next_80b_a3b_pretrain_128gpu_h100_bf16_config, qwen3_next_80b_a3b_pretrain_128gpu_h100_fp8cs_config, ) -from megatron.bridge.perf_recipes.qwen.vr200.qwen3_moe import ( - qwen3_30b_a3b_pretrain_8gpu_vr200_bf16_config, - qwen3_30b_a3b_pretrain_8gpu_vr200_fp8mx_config, - qwen3_30b_a3b_pretrain_8gpu_vr200_nvfp4_config, - qwen3_235b_a22b_pretrain_256gpu_vr200_bf16_config, - qwen3_235b_a22b_pretrain_256gpu_vr200_fp8mx_config, - qwen3_235b_a22b_pretrain_256gpu_vr200_nvfp4_config, +from megatron.bridge.perf_recipes.qwen.vrnvl72.qwen3_moe import ( + qwen3_30b_a3b_pretrain_8gpu_vrnvl72_bf16_config, + qwen3_30b_a3b_pretrain_8gpu_vrnvl72_fp8mx_config, + qwen3_30b_a3b_pretrain_8gpu_vrnvl72_nvfp4_config, + qwen3_235b_a22b_pretrain_256gpu_vrnvl72_bf16_config, + qwen3_235b_a22b_pretrain_256gpu_vrnvl72_fp8mx_config, + qwen3_235b_a22b_pretrain_256gpu_vrnvl72_nvfp4_config, ) diff --git a/src/megatron/bridge/perf_recipes/qwen/gb300/qwen3_moe.py b/src/megatron/bridge/perf_recipes/qwen/gb300/qwen3_moe.py index d3842d77c5..d6c24f0464 100644 --- a/src/megatron/bridge/perf_recipes/qwen/gb300/qwen3_moe.py +++ b/src/megatron/bridge/perf_recipes/qwen/gb300/qwen3_moe.py @@ -192,7 +192,7 @@ def qwen3_235b_a22b_pretrain_64gpu_gb300_fp8mx_config() -> ConfigContainer: def _build_qwen3_30b_a3b_gb300_bf16() -> ConfigContainer: - """Shared HybridEP BF16 base for the Qwen3 30B-A3B 8-GPU GB300 recipe and its VR200 alias.""" + """Shared HybridEP BF16 base for the Qwen3 30B-A3B 8-GPU GB300 recipe and its VRNVL72 alias.""" cfg = qwen3_30b_a3b_pretrain_config() cfg.mixed_precision = _perf_precision("bf16") cfg.model.bias_activation_fusion = True @@ -308,7 +308,7 @@ def qwen3_30b_a3b_pretrain_8gpu_gb300_fp8cs_config() -> ConfigContainer: def _build_qwen3_30b_a3b_gb300_fp8mx() -> ConfigContainer: - """Shared HybridEP MXFP8 base for the Qwen3 30B-A3B 8-GPU GB300 recipe and its VR200 alias.""" + """Shared HybridEP MXFP8 base for the Qwen3 30B-A3B 8-GPU GB300 recipe and its VRNVL72 alias.""" cfg = qwen3_30b_a3b_pretrain_config() cfg.mixed_precision = _perf_precision("fp8_mx") cfg.model.bias_activation_fusion = True @@ -368,7 +368,7 @@ def qwen3_30b_a3b_pretrain_8gpu_gb300_fp8mx_config() -> ConfigContainer: def _build_qwen3_235b_a22b_gb300_bf16() -> ConfigContainer: - """Shared HybridEP BF16 base for the Qwen3 235B-A22B 256-GPU GB300 recipe and its VR200 alias.""" + """Shared HybridEP BF16 base for the Qwen3 235B-A22B 256-GPU GB300 recipe and its VRNVL72 alias.""" cfg = qwen3_235b_a22b_pretrain_config() cfg.mixed_precision = _perf_precision("bf16") cfg.model.bias_activation_fusion = True @@ -488,7 +488,7 @@ def qwen3_235b_a22b_pretrain_256gpu_gb300_fp8cs_config() -> ConfigContainer: def _build_qwen3_235b_a22b_gb300_fp8mx() -> ConfigContainer: - """Shared HybridEP MXFP8 base for the Qwen3 235B-A22B 256-GPU GB300 recipe and its VR200 alias.""" + """Shared HybridEP MXFP8 base for the Qwen3 235B-A22B 256-GPU GB300 recipe and its VRNVL72 alias.""" cfg = qwen3_235b_a22b_pretrain_config() cfg.mixed_precision = _perf_precision("fp8_mx") cfg.model.bias_activation_fusion = True @@ -629,7 +629,7 @@ def qwen3_235b_a22b_pretrain_64gpu_gb300_nvfp4_full_iteration_config() -> Config def _build_qwen3_235b_a22b_gb300_nvfp4() -> ConfigContainer: - """Shared HybridEP NVFP4 base (full-iteration CG, A2A overlap) for the GB300 recipe and its VR200 alias.""" + """Shared HybridEP NVFP4 base (full-iteration CG, A2A overlap) for the GB300 recipe and its VRNVL72 alias.""" cfg = qwen3_235b_a22b_pretrain_256gpu_gb300_fp8cs_config() cfg.mixed_precision = _perf_precision("nvfp4") cfg.comm_overlap.tp_comm_overlap = False diff --git a/src/megatron/bridge/perf_recipes/qwen/vr200/__init__.py b/src/megatron/bridge/perf_recipes/qwen/vrnvl72/__init__.py similarity index 100% rename from src/megatron/bridge/perf_recipes/qwen/vr200/__init__.py rename to src/megatron/bridge/perf_recipes/qwen/vrnvl72/__init__.py diff --git a/src/megatron/bridge/perf_recipes/qwen/vr200/qwen3_moe.py b/src/megatron/bridge/perf_recipes/qwen/vrnvl72/qwen3_moe.py similarity index 88% rename from src/megatron/bridge/perf_recipes/qwen/vr200/qwen3_moe.py rename to src/megatron/bridge/perf_recipes/qwen/vrnvl72/qwen3_moe.py index a642b92110..ac548cb2fe 100644 --- a/src/megatron/bridge/perf_recipes/qwen/vr200/qwen3_moe.py +++ b/src/megatron/bridge/perf_recipes/qwen/vrnvl72/qwen3_moe.py @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""VR200 performance recipes for Qwen3 MoE.""" +"""VRNVL72 performance recipes for Qwen3 MoE.""" from megatron.bridge.perf_recipes.environment import COMMON_PERF_ENV_VARS from megatron.bridge.perf_recipes.qwen.common import ConfigContainer @@ -25,8 +25,8 @@ ) -def qwen3_235b_a22b_pretrain_256gpu_vr200_bf16_config() -> ConfigContainer: - """Qwen3 235B A22B pretrain: 256× VR200, BF16 (alias of GB300).""" +def qwen3_235b_a22b_pretrain_256gpu_vrnvl72_bf16_config() -> ConfigContainer: + """Qwen3 235B A22B pretrain: 256× VRNVL72, BF16 (alias of GB300).""" cfg = _build_qwen3_235b_a22b_gb300_bf16() cfg.model.cuda_graph_scope = ["moe_router", "moe_preprocess"] @@ -53,8 +53,8 @@ def qwen3_235b_a22b_pretrain_256gpu_vr200_bf16_config() -> ConfigContainer: return cfg -def qwen3_235b_a22b_pretrain_256gpu_vr200_fp8mx_config() -> ConfigContainer: - """Qwen3 235B A22B pretrain: 256× VR200, FP8-MX (alias of GB300).""" +def qwen3_235b_a22b_pretrain_256gpu_vrnvl72_fp8mx_config() -> ConfigContainer: + """Qwen3 235B A22B pretrain: 256× VRNVL72, FP8-MX (alias of GB300).""" cfg = _build_qwen3_235b_a22b_gb300_fp8mx() # Keep process settings next to the recipe so users can see the exact benchmark environment. cfg.env_vars = { @@ -81,8 +81,8 @@ def qwen3_235b_a22b_pretrain_256gpu_vr200_fp8mx_config() -> ConfigContainer: return cfg -def qwen3_235b_a22b_pretrain_256gpu_vr200_nvfp4_config() -> ConfigContainer: - """Qwen3 235B A22B pretrain: 256× VR200, NVFP4, full-iteration CG and A2A overlap.""" +def qwen3_235b_a22b_pretrain_256gpu_vrnvl72_nvfp4_config() -> ConfigContainer: + """Qwen3 235B A22B pretrain: 256× VRNVL72, NVFP4, full-iteration CG and A2A overlap.""" cfg = _build_qwen3_235b_a22b_gb300_nvfp4() # Keep process settings next to the recipe so users can see the exact benchmark environment. @@ -112,8 +112,8 @@ def qwen3_235b_a22b_pretrain_256gpu_vr200_nvfp4_config() -> ConfigContainer: return cfg -def qwen3_30b_a3b_pretrain_8gpu_vr200_bf16_config() -> ConfigContainer: - """Qwen3 30B-A3B pretrain: 8× VR200, BF16 (alias of GB300).""" +def qwen3_30b_a3b_pretrain_8gpu_vrnvl72_bf16_config() -> ConfigContainer: + """Qwen3 30B-A3B pretrain: 8× VRNVL72, BF16 (alias of GB300).""" cfg = _build_qwen3_30b_a3b_gb300_bf16() # Keep process settings next to the recipe so users can see the exact benchmark environment. cfg.env_vars = { @@ -138,8 +138,8 @@ def qwen3_30b_a3b_pretrain_8gpu_vr200_bf16_config() -> ConfigContainer: return cfg -def qwen3_30b_a3b_pretrain_8gpu_vr200_fp8mx_config() -> ConfigContainer: - """Qwen3 30B-A3B pretrain: 8× VR200, FP8-MX (alias of GB300).""" +def qwen3_30b_a3b_pretrain_8gpu_vrnvl72_fp8mx_config() -> ConfigContainer: + """Qwen3 30B-A3B pretrain: 8× VRNVL72, FP8-MX (alias of GB300).""" cfg = _build_qwen3_30b_a3b_gb300_fp8mx() cfg.train.micro_batch_size = 4 @@ -173,8 +173,8 @@ def qwen3_30b_a3b_pretrain_8gpu_vr200_fp8mx_config() -> ConfigContainer: return cfg -def qwen3_30b_a3b_pretrain_8gpu_vr200_nvfp4_config() -> ConfigContainer: - """Qwen3 30B-A3B pretrain: 8× VR200, NVFP4 (same layout as GB300). +def qwen3_30b_a3b_pretrain_8gpu_vrnvl72_nvfp4_config() -> ConfigContainer: + """Qwen3 30B-A3B pretrain: 8× VRNVL72, NVFP4 (same layout as GB300). NVFP4's fp4_param_gather path is incompatible with TP comm overlap, so it is disabled here. diff --git a/src/megatron/bridge/perf_recipes/qwen_vl/__init__.py b/src/megatron/bridge/perf_recipes/qwen_vl/__init__.py index 1ac76fdec8..ddca7d8ea0 100644 --- a/src/megatron/bridge/perf_recipes/qwen_vl/__init__.py +++ b/src/megatron/bridge/perf_recipes/qwen_vl/__init__.py @@ -80,14 +80,14 @@ qwen35_vl_397b_a17b_pretrain_256gpu_h100_bf16_config, qwen35_vl_397b_a17b_pretrain_256gpu_h100_fp8cs_config, ) -from megatron.bridge.perf_recipes.qwen_vl.vr200.qwen35_vl import ( - qwen35_vl_35b_a3b_pretrain_8gpu_vr200_bf16_config, - qwen35_vl_35b_a3b_pretrain_8gpu_vr200_fp8cs_config, - qwen35_vl_35b_a3b_pretrain_8gpu_vr200_fp8mx_config, - qwen35_vl_122b_a10b_pretrain_32gpu_vr200_bf16_config, - qwen35_vl_122b_a10b_pretrain_32gpu_vr200_fp8cs_config, - qwen35_vl_122b_a10b_pretrain_32gpu_vr200_fp8mx_config, - qwen35_vl_397b_a17b_pretrain_64gpu_vr200_bf16_config, - qwen35_vl_397b_a17b_pretrain_64gpu_vr200_fp8cs_config, - qwen35_vl_397b_a17b_pretrain_64gpu_vr200_fp8mx_config, +from megatron.bridge.perf_recipes.qwen_vl.vrnvl72.qwen35_vl import ( + qwen35_vl_35b_a3b_pretrain_8gpu_vrnvl72_bf16_config, + qwen35_vl_35b_a3b_pretrain_8gpu_vrnvl72_fp8cs_config, + qwen35_vl_35b_a3b_pretrain_8gpu_vrnvl72_fp8mx_config, + qwen35_vl_122b_a10b_pretrain_32gpu_vrnvl72_bf16_config, + qwen35_vl_122b_a10b_pretrain_32gpu_vrnvl72_fp8cs_config, + qwen35_vl_122b_a10b_pretrain_32gpu_vrnvl72_fp8mx_config, + qwen35_vl_397b_a17b_pretrain_64gpu_vrnvl72_bf16_config, + qwen35_vl_397b_a17b_pretrain_64gpu_vrnvl72_fp8cs_config, + qwen35_vl_397b_a17b_pretrain_64gpu_vrnvl72_fp8mx_config, ) diff --git a/src/megatron/bridge/perf_recipes/qwen_vl/vr200/__init__.py b/src/megatron/bridge/perf_recipes/qwen_vl/vrnvl72/__init__.py similarity index 100% rename from src/megatron/bridge/perf_recipes/qwen_vl/vr200/__init__.py rename to src/megatron/bridge/perf_recipes/qwen_vl/vrnvl72/__init__.py diff --git a/src/megatron/bridge/perf_recipes/qwen_vl/vr200/qwen35_vl.py b/src/megatron/bridge/perf_recipes/qwen_vl/vrnvl72/qwen35_vl.py similarity index 86% rename from src/megatron/bridge/perf_recipes/qwen_vl/vr200/qwen35_vl.py rename to src/megatron/bridge/perf_recipes/qwen_vl/vrnvl72/qwen35_vl.py index b11ebf5dc3..732c88d29d 100644 --- a/src/megatron/bridge/perf_recipes/qwen_vl/vr200/qwen35_vl.py +++ b/src/megatron/bridge/perf_recipes/qwen_vl/vrnvl72/qwen35_vl.py @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""VR200 performance recipes for Qwen3.5-VL.""" +"""VRNVL72 performance recipes for Qwen3.5-VL.""" from megatron.bridge.perf_recipes.environment import COMMON_PERF_ENV_VARS from megatron.bridge.perf_recipes.qwen_vl.common import ConfigContainer, _select_gdn_kernel_backend @@ -28,10 +28,10 @@ ) -def qwen35_vl_35b_a3b_pretrain_8gpu_vr200_bf16_config() -> ConfigContainer: - """Qwen3.5-VL 35B-A3B pretrain: 8× VR200, BF16 (alias of GB300).""" +def qwen35_vl_35b_a3b_pretrain_8gpu_vrnvl72_bf16_config() -> ConfigContainer: + """Qwen3.5-VL 35B-A3B pretrain: 8× VRNVL72, BF16 (alias of GB300).""" cfg = _build_qwen35_vl_35b_a3b_gb300_bf16() - # The GB300 base selects the cuDNN GDN kernel, which has not been measured on VR200; keep FLA until it is. + # The GB300 base selects the cuDNN GDN kernel, which has not been measured on VRNVL72; keep FLA until it is. _select_gdn_kernel_backend(cfg, "fla") # Keep process settings next to the recipe so users can see the exact benchmark environment. cfg.env_vars = { @@ -56,10 +56,10 @@ def qwen35_vl_35b_a3b_pretrain_8gpu_vr200_bf16_config() -> ConfigContainer: return cfg -def qwen35_vl_35b_a3b_pretrain_8gpu_vr200_fp8cs_config() -> ConfigContainer: - """Qwen3.5-VL 35B-A3B pretrain: 8× VR200, FP8-CS (alias of GB300).""" +def qwen35_vl_35b_a3b_pretrain_8gpu_vrnvl72_fp8cs_config() -> ConfigContainer: + """Qwen3.5-VL 35B-A3B pretrain: 8× VRNVL72, FP8-CS (alias of GB300).""" cfg = qwen35_vl_35b_a3b_pretrain_8gpu_gb300_fp8cs_config() - # The GB300 base selects the cuDNN GDN kernel, which has not been measured on VR200; keep FLA until it is. + # The GB300 base selects the cuDNN GDN kernel, which has not been measured on VRNVL72; keep FLA until it is. _select_gdn_kernel_backend(cfg, "fla") # Keep process settings next to the recipe so users can see the exact benchmark environment. cfg.env_vars = { @@ -84,10 +84,10 @@ def qwen35_vl_35b_a3b_pretrain_8gpu_vr200_fp8cs_config() -> ConfigContainer: return cfg -def qwen35_vl_35b_a3b_pretrain_8gpu_vr200_fp8mx_config() -> ConfigContainer: - """Qwen3.5-VL 35B-A3B pretrain: 8× VR200, FP8-MX (alias of GB300).""" +def qwen35_vl_35b_a3b_pretrain_8gpu_vrnvl72_fp8mx_config() -> ConfigContainer: + """Qwen3.5-VL 35B-A3B pretrain: 8× VRNVL72, FP8-MX (alias of GB300).""" cfg = qwen35_vl_35b_a3b_pretrain_8gpu_gb300_fp8mx_config() - # The GB300 base selects the cuDNN GDN kernel, which has not been measured on VR200; keep FLA until it is. + # The GB300 base selects the cuDNN GDN kernel, which has not been measured on VRNVL72; keep FLA until it is. _select_gdn_kernel_backend(cfg, "fla") # Keep process settings next to the recipe so users can see the exact benchmark environment. cfg.env_vars = { @@ -112,8 +112,8 @@ def qwen35_vl_35b_a3b_pretrain_8gpu_vr200_fp8mx_config() -> ConfigContainer: return cfg -def qwen35_vl_122b_a10b_pretrain_32gpu_vr200_bf16_config() -> ConfigContainer: - """Qwen3.5-VL 122B-A10B pretrain: 32× VR200, BF16 (alias of GB300).""" +def qwen35_vl_122b_a10b_pretrain_32gpu_vrnvl72_bf16_config() -> ConfigContainer: + """Qwen3.5-VL 122B-A10B pretrain: 32× VRNVL72, BF16 (alias of GB300).""" cfg = qwen35_vl_122b_a10b_pretrain_32gpu_gb300_bf16_config() # Keep process settings next to the recipe so users can see the exact benchmark environment. cfg.env_vars = { @@ -138,8 +138,8 @@ def qwen35_vl_122b_a10b_pretrain_32gpu_vr200_bf16_config() -> ConfigContainer: return cfg -def qwen35_vl_122b_a10b_pretrain_32gpu_vr200_fp8cs_config() -> ConfigContainer: - """Qwen3.5-VL 122B-A10B pretrain: 32× VR200, FP8-CS (alias of GB300).""" +def qwen35_vl_122b_a10b_pretrain_32gpu_vrnvl72_fp8cs_config() -> ConfigContainer: + """Qwen3.5-VL 122B-A10B pretrain: 32× VRNVL72, FP8-CS (alias of GB300).""" cfg = qwen35_vl_122b_a10b_pretrain_32gpu_gb300_fp8cs_config() # Keep process settings next to the recipe so users can see the exact benchmark environment. cfg.env_vars = { @@ -164,8 +164,8 @@ def qwen35_vl_122b_a10b_pretrain_32gpu_vr200_fp8cs_config() -> ConfigContainer: return cfg -def qwen35_vl_122b_a10b_pretrain_32gpu_vr200_fp8mx_config() -> ConfigContainer: - """Qwen3.5-VL 122B-A10B pretrain: 32× VR200, FP8-MX (alias of GB300).""" +def qwen35_vl_122b_a10b_pretrain_32gpu_vrnvl72_fp8mx_config() -> ConfigContainer: + """Qwen3.5-VL 122B-A10B pretrain: 32× VRNVL72, FP8-MX (alias of GB300).""" cfg = qwen35_vl_122b_a10b_pretrain_32gpu_gb300_fp8mx_config() # Keep process settings next to the recipe so users can see the exact benchmark environment. cfg.env_vars = { @@ -190,10 +190,10 @@ def qwen35_vl_122b_a10b_pretrain_32gpu_vr200_fp8mx_config() -> ConfigContainer: return cfg -def qwen35_vl_397b_a17b_pretrain_64gpu_vr200_bf16_config() -> ConfigContainer: - """Qwen3.5-VL 397B-A17B pretrain: 64× VR200, BF16 (alias of GB300).""" +def qwen35_vl_397b_a17b_pretrain_64gpu_vrnvl72_bf16_config() -> ConfigContainer: + """Qwen3.5-VL 397B-A17B pretrain: 64× VRNVL72, BF16 (alias of GB300).""" cfg = qwen35_vl_397b_a17b_pretrain_64gpu_gb300_bf16_config() - # The GB300 base selects the cuDNN GDN kernel, which has not been measured on VR200; keep FLA until it is. + # The GB300 base selects the cuDNN GDN kernel, which has not been measured on VRNVL72; keep FLA until it is. _select_gdn_kernel_backend(cfg, "fla") # Keep process settings next to the recipe so users can see the exact benchmark environment. cfg.env_vars = { @@ -218,10 +218,10 @@ def qwen35_vl_397b_a17b_pretrain_64gpu_vr200_bf16_config() -> ConfigContainer: return cfg -def qwen35_vl_397b_a17b_pretrain_64gpu_vr200_fp8cs_config() -> ConfigContainer: - """Qwen3.5-VL 397B-A17B pretrain: 64× VR200, FP8-CS (alias of GB300).""" +def qwen35_vl_397b_a17b_pretrain_64gpu_vrnvl72_fp8cs_config() -> ConfigContainer: + """Qwen3.5-VL 397B-A17B pretrain: 64× VRNVL72, FP8-CS (alias of GB300).""" cfg = qwen35_vl_397b_a17b_pretrain_64gpu_gb300_fp8cs_config() - # The GB300 base selects the cuDNN GDN kernel, which has not been measured on VR200; keep FLA until it is. + # The GB300 base selects the cuDNN GDN kernel, which has not been measured on VRNVL72; keep FLA until it is. _select_gdn_kernel_backend(cfg, "fla") # Keep process settings next to the recipe so users can see the exact benchmark environment. cfg.env_vars = { @@ -246,10 +246,10 @@ def qwen35_vl_397b_a17b_pretrain_64gpu_vr200_fp8cs_config() -> ConfigContainer: return cfg -def qwen35_vl_397b_a17b_pretrain_64gpu_vr200_fp8mx_config() -> ConfigContainer: - """Qwen3.5-VL 397B-A17B pretrain: 64× VR200, FP8-MX (alias of GB300).""" +def qwen35_vl_397b_a17b_pretrain_64gpu_vrnvl72_fp8mx_config() -> ConfigContainer: + """Qwen3.5-VL 397B-A17B pretrain: 64× VRNVL72, FP8-MX (alias of GB300).""" cfg = qwen35_vl_397b_a17b_pretrain_64gpu_gb300_fp8mx_config() - # The GB300 base selects the cuDNN GDN kernel, which has not been measured on VR200; keep FLA until it is. + # The GB300 base selects the cuDNN GDN kernel, which has not been measured on VRNVL72; keep FLA until it is. _select_gdn_kernel_backend(cfg, "fla") # Keep process settings next to the recipe so users can see the exact benchmark environment. cfg.env_vars = { diff --git a/tests/unit_tests/recipes/nemotronh/test_nemotron_3_ultra.py b/tests/unit_tests/recipes/nemotronh/test_nemotron_3_ultra.py index 28d250f86b..efe243ebdb 100644 --- a/tests/unit_tests/recipes/nemotronh/test_nemotron_3_ultra.py +++ b/tests/unit_tests/recipes/nemotronh/test_nemotron_3_ultra.py @@ -19,8 +19,8 @@ import megatron.bridge.recipes as recipes from megatron.bridge.perf_recipes.nemotronh import ( - nemotron_3_ultra_pretrain_256gpu_vr200_fp8mx_config, - nemotron_3_ultra_pretrain_256gpu_vr200_nvfp4_config, + nemotron_3_ultra_pretrain_256gpu_vrnvl72_fp8mx_config, + nemotron_3_ultra_pretrain_256gpu_vrnvl72_nvfp4_config, ) from megatron.bridge.recipes.nemotronh.gb200.nemotron_3_ultra import ( nemotron_3_ultra_pretrain_256gpu_gb200_bf16_ep16_config, @@ -166,9 +166,9 @@ def test_gb200_ep16_pretrain_preserves_functional_policy() -> None: @pytest.mark.unit -def test_vr200_perf_recipe_uses_nvl72_ultra_topology() -> None: - """VR200 Ultra preserves the GB300 execution layout with explicit NVL72 settings.""" - cfg = nemotron_3_ultra_pretrain_256gpu_vr200_fp8mx_config() +def test_vrnvl72_perf_recipe_uses_nvl72_ultra_topology() -> None: + """VRNVL72 Ultra preserves the GB300 execution layout with explicit NVL72 settings.""" + cfg = nemotron_3_ultra_pretrain_256gpu_vrnvl72_fp8mx_config() assert cfg.model.tensor_model_parallel_size == 1 assert cfg.model.pipeline_model_parallel_size == 1 @@ -191,9 +191,9 @@ def test_vr200_perf_recipe_uses_nvl72_ultra_topology() -> None: @pytest.mark.unit -def test_vr200_nvfp4_perf_recipe_uses_nvl72_ultra_topology() -> None: - """VR200 Ultra NVFP4 preserves the GB300 NVFP4 execution layout with explicit NVL72 settings.""" - cfg = nemotron_3_ultra_pretrain_256gpu_vr200_nvfp4_config() +def test_vrnvl72_nvfp4_perf_recipe_uses_nvl72_ultra_topology() -> None: + """VRNVL72 Ultra NVFP4 preserves the GB300 NVFP4 execution layout with explicit NVL72 settings.""" + cfg = nemotron_3_ultra_pretrain_256gpu_vrnvl72_nvfp4_config() assert cfg.model.tensor_model_parallel_size == 1 assert cfg.model.pipeline_model_parallel_size == 1 diff --git a/tests/unit_tests/recipes/test_deepseek_v3_proxy_recipes.py b/tests/unit_tests/recipes/test_deepseek_v3_proxy_recipes.py index c22e1cb393..0e39115e16 100644 --- a/tests/unit_tests/recipes/test_deepseek_v3_proxy_recipes.py +++ b/tests/unit_tests/recipes/test_deepseek_v3_proxy_recipes.py @@ -38,10 +38,10 @@ def _offline_recipes(monkeypatch: pytest.MonkeyPatch) -> None: @pytest.mark.parametrize("precision", ["fp8mx", "nvfp4"]) def test_proxy_preserves_parent_except_depth_and_layout(precision: str) -> None: parent_fn: Callable[[], ConfigContainer] = getattr( - deepseek, f"deepseek_v3_pretrain_256gpu_vr200_{precision}_config" + deepseek, f"deepseek_v3_pretrain_256gpu_vrnvl72_{precision}_config" ) proxy_fn: Callable[[], ConfigContainer] = getattr( - deepseek, f"deepseek_v3_pretrain_64gpu_vr200_{precision}_proxy_config" + deepseek, f"deepseek_v3_pretrain_64gpu_vrnvl72_{precision}_proxy_config" ) parent = parent_fn() proxy = proxy_fn() @@ -111,7 +111,7 @@ def test_proxy_preserves_parent_except_depth_and_layout(precision: str) -> None: @pytest.mark.parametrize("precision", ["fp8mx", "nvfp4"]) def test_proxy_overlap_setup_without_pipeline_parallelism(monkeypatch: pytest.MonkeyPatch, precision: str) -> None: - cfg = getattr(deepseek, f"deepseek_v3_pretrain_64gpu_vr200_{precision}_proxy_config")() + cfg = getattr(deepseek, f"deepseek_v3_pretrain_64gpu_vrnvl72_{precision}_proxy_config")() # Validate the topology without requiring the GPU libraries in this unit test. monkeypatch.setattr("megatron.bridge.training.comm_overlap.is_te_min_version", lambda *_: True) monkeypatch.setattr("megatron.bridge.training.comm_overlap.is_torch_min_version", lambda *_: True) @@ -137,7 +137,7 @@ def test_proxy_is_available_through_performance_selector(monkeypatch: pytest.Mon monkeypatch.syspath_prepend(str(Path(__file__).resolve().parents[3] / "scripts" / "performance")) from utils.utils import get_perf_recipe_by_name, list_available_config_variants - cfg = get_perf_recipe_by_name("deepseek_v3", "pretrain", 64, "vr200", precision, config_variant="proxy") + cfg = get_perf_recipe_by_name("deepseek_v3", "pretrain", 64, "vrnvl72", precision, config_variant="proxy") assert cfg.train.global_batch_size == 4096 assert cfg.model.num_layers == 13 assert cfg.model.pipeline_model_parallel_size == 1 @@ -147,7 +147,7 @@ def test_proxy_is_available_through_performance_selector(monkeypatch: pytest.Mon assert "proxy" in list_available_config_variants( model_family_name="deepseek", model_recipe_name="deepseek_v3", - gpu="vr200", + gpu="vrnvl72", compute_dtype=precision, task="pretrain", ) diff --git a/tests/unit_tests/recipes/test_deepseek_v4_flash_perf_recipes.py b/tests/unit_tests/recipes/test_deepseek_v4_flash_perf_recipes.py index 7f8d5ae988..3d14c89302 100644 --- a/tests/unit_tests/recipes/test_deepseek_v4_flash_perf_recipes.py +++ b/tests/unit_tests/recipes/test_deepseek_v4_flash_perf_recipes.py @@ -24,7 +24,7 @@ deepseek_v4_flash_pretrain_128gpu_b300_fp8mx_config, deepseek_v4_flash_pretrain_128gpu_gb200_fp8mx_config, deepseek_v4_flash_pretrain_128gpu_gb300_fp8mx_config, - deepseek_v4_flash_pretrain_128gpu_vr200_fp8mx_config, + deepseek_v4_flash_pretrain_128gpu_vrnvl72_fp8mx_config, ) from megatron.bridge.utils.cuda_graph import cuda_graph_module_names, is_full_iteration_cuda_graph from tests.unit_tests.recipes.recipe_test_utils import patch_recipe_construction_dependencies @@ -136,24 +136,24 @@ def test_deepseek_v4_flash_128gpu_gb300_fp8mx_config() -> None: assert cfg.env_vars["NUM_OF_HYBRID_EP_RANKS_PER_NVLINK_DOMAIN"] == 32 -def test_deepseek_v4_flash_128gpu_vr200_fp8mx_disables_clamp_for_cutedsl() -> None: - vr200_cfg = deepseek_v4_flash_pretrain_128gpu_vr200_fp8mx_config() +def test_deepseek_v4_flash_128gpu_vrnvl72_fp8mx_disables_clamp_for_cutedsl() -> None: + vrnvl72_cfg = deepseek_v4_flash_pretrain_128gpu_vrnvl72_fp8mx_config() gb300_cfg = deepseek_v4_flash_pretrain_128gpu_gb300_fp8mx_config() - assert vr200_cfg.model.activation_func_clamp_value is None - assert vr200_cfg.model.use_transformer_engine_op_fuser is True - assert vr200_cfg.model.moe_use_grouped_tensor is True - assert vr200_cfg.env_vars["NVTE_CUTEDSL_FUSED_GROUPED_MLP"] == 1 - assert vr200_cfg.env_vars["NVTE_ALLOW_NONDETERMINISTIC_ALGO"] == 0 - assert is_full_iteration_cuda_graph(vr200_cfg.model) + assert vrnvl72_cfg.model.activation_func_clamp_value is None + assert vrnvl72_cfg.model.use_transformer_engine_op_fuser is True + assert vrnvl72_cfg.model.moe_use_grouped_tensor is True + assert vrnvl72_cfg.env_vars["NVTE_CUTEDSL_FUSED_GROUPED_MLP"] == 1 + assert vrnvl72_cfg.env_vars["NVTE_ALLOW_NONDETERMINISTIC_ALGO"] == 0 + assert is_full_iteration_cuda_graph(vrnvl72_cfg.model) gb300_cfg.model.activation_func_clamp_value = None gb300_cfg.model.use_transformer_engine_op_fuser = True gb300_cfg.model.moe_use_grouped_tensor = True - assert vars(vr200_cfg.model) == vars(gb300_cfg.model) - for field in fields(vr200_cfg): + assert vars(vrnvl72_cfg.model) == vars(gb300_cfg.model) + for field in fields(vrnvl72_cfg): if field.name != "model": - assert getattr(vr200_cfg, field.name) == getattr(gb300_cfg, field.name), field.name + assert getattr(vrnvl72_cfg, field.name) == getattr(gb300_cfg, field.name), field.name def test_deepseek_v4_flash_128gpu_b300_fp8mx_config() -> None: diff --git a/tests/unit_tests/recipes/test_deepseek_vr200_perf_recipes.py b/tests/unit_tests/recipes/test_deepseek_vrnvl72_perf_recipes.py similarity index 77% rename from tests/unit_tests/recipes/test_deepseek_vr200_perf_recipes.py rename to tests/unit_tests/recipes/test_deepseek_vrnvl72_perf_recipes.py index 0ebe10db5e..7b25607bc2 100644 --- a/tests/unit_tests/recipes/test_deepseek_vr200_perf_recipes.py +++ b/tests/unit_tests/recipes/test_deepseek_vrnvl72_perf_recipes.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""Tests for DeepSeek V3 VR200 performance recipe topology.""" +"""Tests for DeepSeek V3 VRNVL72 performance recipe topology.""" import importlib.util import sys @@ -26,7 +26,7 @@ pytestmark = pytest.mark.unit -def _load_vr200_recipe_module(monkeypatch: pytest.MonkeyPatch) -> ModuleType: +def _load_vrnvl72_recipe_module(monkeypatch: pytest.MonkeyPatch) -> ModuleType: common = ModuleType("megatron.bridge.perf_recipes.deepseek.common") common.ConfigContainer = SimpleNamespace common._benchmark_common = lambda _cfg: None @@ -45,7 +45,7 @@ def _load_vr200_recipe_module(monkeypatch: pytest.MonkeyPatch) -> ModuleType: gb300 = ModuleType("megatron.bridge.perf_recipes.deepseek.gb300.deepseek_v3") for precision in ("bf16", "fp8cs", "fp8mx", "nvfp4"): setattr(gb300, f"deepseek_v3_pretrain_256gpu_gb300_{precision}_config", lambda: SimpleNamespace()) - # HybridEP base builders shared with the VR200 aliases (the GB300 configs add NCCL EP on top). + # HybridEP base builders shared with the VRNVL72 aliases (the GB300 configs add NCCL EP on top). setattr(gb300, f"_build_deepseek_v3_gb300_{precision}", lambda: SimpleNamespace()) monkeypatch.setitem(sys.modules, gb300.__name__, gb300) @@ -53,8 +53,8 @@ def _load_vr200_recipe_module(monkeypatch: pytest.MonkeyPatch) -> ModuleType: environment.COMMON_PERF_ENV_VARS = {} monkeypatch.setitem(sys.modules, environment.__name__, environment) - path = Path(__file__).resolve().parents[3] / "src/megatron/bridge/perf_recipes/deepseek/vr200/deepseek_v3.py" - spec = importlib.util.spec_from_file_location("_deepseek_vr200_recipe_under_test", path) + path = Path(__file__).resolve().parents[3] / "src/megatron/bridge/perf_recipes/deepseek/vrnvl72/deepseek_v3.py" + spec = importlib.util.spec_from_file_location("_deepseek_vrnvl72_recipe_under_test", path) assert spec is not None and spec.loader is not None module = importlib.util.module_from_spec(spec) spec.loader.exec_module(module) @@ -64,14 +64,16 @@ def _load_vr200_recipe_module(monkeypatch: pytest.MonkeyPatch) -> ModuleType: @pytest.mark.parametrize( "recipe_factory_name", ( - "deepseek_v3_pretrain_128gpu_vr200_bf16_config", - "deepseek_v3_pretrain_128gpu_vr200_fp8cs_config", - "deepseek_v3_pretrain_128gpu_vr200_fp8mx_config", - "deepseek_v3_pretrain_128gpu_vr200_nvfp4_config", + "deepseek_v3_pretrain_128gpu_vrnvl72_bf16_config", + "deepseek_v3_pretrain_128gpu_vrnvl72_fp8cs_config", + "deepseek_v3_pretrain_128gpu_vrnvl72_fp8mx_config", + "deepseek_v3_pretrain_128gpu_vrnvl72_nvfp4_config", ), ) -def test_deepseek_v3_128gpu_vr200_topology_is_valid(recipe_factory_name: str, monkeypatch: pytest.MonkeyPatch) -> None: - module = _load_vr200_recipe_module(monkeypatch) +def test_deepseek_v3_128gpu_vrnvl72_topology_is_valid( + recipe_factory_name: str, monkeypatch: pytest.MonkeyPatch +) -> None: + module = _load_vrnvl72_recipe_module(monkeypatch) recipe_factory = getattr(module, recipe_factory_name) cfg = recipe_factory() diff --git a/tests/unit_tests/recipes/test_gb300_ncclep_perf_recipes.py b/tests/unit_tests/recipes/test_gb300_ncclep_perf_recipes.py index 4f3b164988..ce024cb80e 100644 --- a/tests/unit_tests/recipes/test_gb300_ncclep_perf_recipes.py +++ b/tests/unit_tests/recipes/test_gb300_ncclep_perf_recipes.py @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""Every GB300 MoE perf recipe switched to NCCL EP carries the full NCCL EP stack, and the VR200 +"""Every GB300 MoE perf recipe switched to NCCL EP carries the full NCCL EP stack, and the VRNVL72 aliases built on the shared HybridEP bases stay on HybridEP.""" import importlib @@ -53,27 +53,27 @@ ("qwen_vl.gb300.qwen35_vl", "qwen35_vl_35b_a3b_pretrain_8gpu_gb300_bf16_config"), ) -# VR200 aliases of the same recipes: they reuse the shared HybridEP builders and must not pick up NCCL EP. -_VR200_ALIASES = ( - ("deepseek.vr200.deepseek_v3", "deepseek_v3_pretrain_256gpu_vr200_bf16_config"), - ("deepseek.vr200.deepseek_v3", "deepseek_v3_pretrain_256gpu_vr200_fp8mx_config"), - ("deepseek.vr200.deepseek_v3", "deepseek_v3_pretrain_256gpu_vr200_nvfp4_config"), - ("gpt_oss.vr200.gpt_oss", "gpt_oss_120b_pretrain_64gpu_vr200_fp8mx_config"), - ("kimi.vr200.kimi_k2", "kimi_k2_pretrain_256gpu_vr200_fp8mx_config"), - ("nemotronh.vr200.nemotronh", "nemotron_3_nano_pretrain_8gpu_vr200_bf16_config"), - ("nemotronh.vr200.nemotronh", "nemotron_3_super_pretrain_64gpu_vr200_bf16_config"), - ("nemotronh.vr200.nemotronh", "nemotron_3_super_pretrain_64gpu_vr200_nvfp4_config"), - ("nemotronh.vr200.nemotronh", "nemotron_3_ultra_pretrain_256gpu_vr200_fp8mx_config"), - ("nemotronh.vr200.nemotronh", "nemotron_3_5_lightning_pretrain_8gpu_vr200_bf16_config"), - ("nemotronh.vr200.nemotronh", "nemotron_3_5_lightning_pretrain_8gpu_vr200_fp8mx_config"), - ("deepseek.vr200.deepseek_v3", "deepseek_v3_pretrain_64gpu_vr200_fp8mx_proxy_config"), - ("deepseek.vr200.deepseek_v3", "deepseek_v3_pretrain_64gpu_vr200_nvfp4_proxy_config"), - ("qwen.vr200.qwen3_moe", "qwen3_235b_a22b_pretrain_256gpu_vr200_bf16_config"), - ("qwen.vr200.qwen3_moe", "qwen3_235b_a22b_pretrain_256gpu_vr200_fp8mx_config"), - ("qwen.vr200.qwen3_moe", "qwen3_235b_a22b_pretrain_256gpu_vr200_nvfp4_config"), - ("qwen.vr200.qwen3_moe", "qwen3_30b_a3b_pretrain_8gpu_vr200_bf16_config"), - ("qwen.vr200.qwen3_moe", "qwen3_30b_a3b_pretrain_8gpu_vr200_fp8mx_config"), - ("qwen_vl.vr200.qwen35_vl", "qwen35_vl_35b_a3b_pretrain_8gpu_vr200_bf16_config"), +# VRNVL72 aliases of the same recipes: they reuse the shared HybridEP builders and must not pick up NCCL EP. +_VRNVL72_ALIASES = ( + ("deepseek.vrnvl72.deepseek_v3", "deepseek_v3_pretrain_256gpu_vrnvl72_bf16_config"), + ("deepseek.vrnvl72.deepseek_v3", "deepseek_v3_pretrain_256gpu_vrnvl72_fp8mx_config"), + ("deepseek.vrnvl72.deepseek_v3", "deepseek_v3_pretrain_256gpu_vrnvl72_nvfp4_config"), + ("gpt_oss.vrnvl72.gpt_oss", "gpt_oss_120b_pretrain_64gpu_vrnvl72_fp8mx_config"), + ("kimi.vrnvl72.kimi_k2", "kimi_k2_pretrain_256gpu_vrnvl72_fp8mx_config"), + ("nemotronh.vrnvl72.nemotronh", "nemotron_3_nano_pretrain_8gpu_vrnvl72_bf16_config"), + ("nemotronh.vrnvl72.nemotronh", "nemotron_3_super_pretrain_64gpu_vrnvl72_bf16_config"), + ("nemotronh.vrnvl72.nemotronh", "nemotron_3_super_pretrain_64gpu_vrnvl72_nvfp4_config"), + ("nemotronh.vrnvl72.nemotronh", "nemotron_3_ultra_pretrain_256gpu_vrnvl72_fp8mx_config"), + ("nemotronh.vrnvl72.nemotronh", "nemotron_3_5_lightning_pretrain_8gpu_vrnvl72_bf16_config"), + ("nemotronh.vrnvl72.nemotronh", "nemotron_3_5_lightning_pretrain_8gpu_vrnvl72_fp8mx_config"), + ("deepseek.vrnvl72.deepseek_v3", "deepseek_v3_pretrain_64gpu_vrnvl72_fp8mx_proxy_config"), + ("deepseek.vrnvl72.deepseek_v3", "deepseek_v3_pretrain_64gpu_vrnvl72_nvfp4_proxy_config"), + ("qwen.vrnvl72.qwen3_moe", "qwen3_235b_a22b_pretrain_256gpu_vrnvl72_bf16_config"), + ("qwen.vrnvl72.qwen3_moe", "qwen3_235b_a22b_pretrain_256gpu_vrnvl72_fp8mx_config"), + ("qwen.vrnvl72.qwen3_moe", "qwen3_235b_a22b_pretrain_256gpu_vrnvl72_nvfp4_config"), + ("qwen.vrnvl72.qwen3_moe", "qwen3_30b_a3b_pretrain_8gpu_vrnvl72_bf16_config"), + ("qwen.vrnvl72.qwen3_moe", "qwen3_30b_a3b_pretrain_8gpu_vrnvl72_fp8mx_config"), + ("qwen_vl.vrnvl72.qwen35_vl", "qwen35_vl_35b_a3b_pretrain_8gpu_vrnvl72_bf16_config"), ) @@ -81,7 +81,7 @@ # every recipe module that is already loaded, so a lazy import inside a test would escape the patch. _RECIPE_MODULES = { module_name: importlib.import_module(f"megatron.bridge.perf_recipes.{module_name}") - for module_name in sorted({name for name, _ in (*_GB300_NCCLEP_RECIPES, *_VR200_ALIASES)}) + for module_name in sorted({name for name, _ in (*_GB300_NCCLEP_RECIPES, *_VRNVL72_ALIASES)}) } @@ -118,8 +118,8 @@ def test_gb300_deepseek_hsdp_uses_hybridep() -> None: assert cfg.env_vars.keys().isdisjoint(_NCCL_EP_ENV) -@pytest.mark.parametrize(("module_name", "factory_name"), _VR200_ALIASES, ids=lambda value: value) -def test_vr200_aliases_do_not_inherit_nccl_ep(module_name: str, factory_name: str) -> None: +@pytest.mark.parametrize(("module_name", "factory_name"), _VRNVL72_ALIASES, ids=lambda value: value) +def test_vrnvl72_aliases_do_not_inherit_nccl_ep(module_name: str, factory_name: str) -> None: cfg = _build(module_name, factory_name) # The aliases keep the dispatcher their HybridEP base had upstream (flex/hybridep, or alltoall for the diff --git a/tests/unit_tests/recipes/test_moe_full_iteration_recipes.py b/tests/unit_tests/recipes/test_moe_full_iteration_recipes.py index 23904cf812..3f34f5d418 100644 --- a/tests/unit_tests/recipes/test_moe_full_iteration_recipes.py +++ b/tests/unit_tests/recipes/test_moe_full_iteration_recipes.py @@ -18,16 +18,16 @@ import pytest -from megatron.bridge.perf_recipes.deepseek import deepseek_v3_pretrain_256gpu_vr200_nvfp4_config +from megatron.bridge.perf_recipes.deepseek import deepseek_v3_pretrain_256gpu_vrnvl72_nvfp4_config from megatron.bridge.perf_recipes.nemotronh import ( nemotron_3_super_pretrain_64gpu_gb200_fp8mx_config, nemotron_3_super_pretrain_64gpu_gb200_nvfp4_config, nemotron_3_super_pretrain_64gpu_gb300_fp8mx_config, nemotron_3_super_pretrain_64gpu_gb300_nvfp4_config, - nemotron_3_super_pretrain_64gpu_vr200_fp8mx_config, - nemotron_3_super_pretrain_64gpu_vr200_nvfp4_config, + nemotron_3_super_pretrain_64gpu_vrnvl72_fp8mx_config, + nemotron_3_super_pretrain_64gpu_vrnvl72_nvfp4_config, ) -from megatron.bridge.perf_recipes.qwen import qwen3_235b_a22b_pretrain_256gpu_vr200_nvfp4_config +from megatron.bridge.perf_recipes.qwen import qwen3_235b_a22b_pretrain_256gpu_vrnvl72_nvfp4_config from megatron.bridge.training.config import ConfigContainer from tests.unit_tests.recipes.recipe_test_utils import patch_recipe_construction_dependencies @@ -72,8 +72,8 @@ def _assert_full_iteration_hybridep(cfg: ConfigContainer) -> None: assert "graph_capture_record_stream_reuse:True" in cfg.env_vars["PYTORCH_CUDA_ALLOC_CONF"] -def test_qwen3_235b_vr200_nvfp4_uses_full_iteration_stack() -> None: - cfg = qwen3_235b_a22b_pretrain_256gpu_vr200_nvfp4_config() +def test_qwen3_235b_vrnvl72_nvfp4_uses_full_iteration_stack() -> None: + cfg = qwen3_235b_a22b_pretrain_256gpu_vrnvl72_nvfp4_config() _assert_full_iteration_hybridep(cfg) assert cfg.mixed_precision.fp4 == "e2m1" @@ -94,8 +94,8 @@ def test_qwen3_235b_vr200_nvfp4_uses_full_iteration_stack() -> None: ) == (1, 4, 12, 32) -def test_deepseek_v3_256gpu_vr200_nvfp4_uses_full_iteration_stack() -> None: - cfg = deepseek_v3_pretrain_256gpu_vr200_nvfp4_config() +def test_deepseek_v3_256gpu_vrnvl72_nvfp4_uses_full_iteration_stack() -> None: + cfg = deepseek_v3_pretrain_256gpu_vrnvl72_nvfp4_config() _assert_full_iteration_hybridep(cfg) assert cfg.mixed_precision.fp4 == "e2m1" @@ -124,7 +124,7 @@ def test_deepseek_v3_256gpu_vr200_nvfp4_uses_full_iteration_stack() -> None: [ (nemotron_3_super_pretrain_64gpu_gb200_fp8mx_config, 2, 16), (nemotron_3_super_pretrain_64gpu_gb300_fp8mx_config, 1, 8), - (nemotron_3_super_pretrain_64gpu_vr200_fp8mx_config, 1, 8), + (nemotron_3_super_pretrain_64gpu_vrnvl72_fp8mx_config, 1, 8), ], ) def test_nemotron_3_super_mxfp8_uses_full_iteration_stack( @@ -162,7 +162,7 @@ def test_nemotron_3_super_mxfp8_uses_full_iteration_stack( [ (nemotron_3_super_pretrain_64gpu_gb200_nvfp4_config, 2, 16), (nemotron_3_super_pretrain_64gpu_gb300_nvfp4_config, 1, 16), - (nemotron_3_super_pretrain_64gpu_vr200_nvfp4_config, 1, 16), + (nemotron_3_super_pretrain_64gpu_vrnvl72_nvfp4_config, 1, 16), ], ) def test_nemotron_3_super_nvfp4_uses_full_iteration_stack( diff --git a/tests/unit_tests/recipes/test_nemotron_3_5_lightning_perf_recipes.py b/tests/unit_tests/recipes/test_nemotron_3_5_lightning_perf_recipes.py index fd84cbf23a..c973fc56f9 100644 --- a/tests/unit_tests/recipes/test_nemotron_3_5_lightning_perf_recipes.py +++ b/tests/unit_tests/recipes/test_nemotron_3_5_lightning_perf_recipes.py @@ -37,8 +37,8 @@ nemotron_3_5_lightning_pretrain_8gpu_gb300_fp8mx_config, nemotron_3_5_lightning_pretrain_8gpu_gb300_fp8mx_fsdp_config, nemotron_3_5_lightning_pretrain_8gpu_gb300_nvfp4_config, - nemotron_3_5_lightning_pretrain_8gpu_vr200_bf16_config, - nemotron_3_5_lightning_pretrain_8gpu_vr200_fp8mx_config, + nemotron_3_5_lightning_pretrain_8gpu_vrnvl72_bf16_config, + nemotron_3_5_lightning_pretrain_8gpu_vrnvl72_fp8mx_config, nemotron_3_5_lightning_pretrain_16gpu_h100_bf16_config, nemotron_3_5_lightning_pretrain_16gpu_h100_fp8cs_config, nemotron_3_nano_pretrain_8gpu_b200_bf16_config, @@ -110,11 +110,11 @@ ) _FULL_ITERATION_MXFP8_RECIPES = ( nemotron_3_5_lightning_pretrain_8gpu_gb300_fp8mx_config, - nemotron_3_5_lightning_pretrain_8gpu_vr200_fp8mx_config, + nemotron_3_5_lightning_pretrain_8gpu_vrnvl72_fp8mx_config, ) -_VR200_RECIPES = ( - nemotron_3_5_lightning_pretrain_8gpu_vr200_bf16_config, - nemotron_3_5_lightning_pretrain_8gpu_vr200_fp8mx_config, +_VRNVL72_RECIPES = ( + nemotron_3_5_lightning_pretrain_8gpu_vrnvl72_bf16_config, + nemotron_3_5_lightning_pretrain_8gpu_vrnvl72_fp8mx_config, ) _NEMOTRON_3_RECIPES = ( nemotron_3_nano_pretrain_16gpu_h100_bf16_config, @@ -205,9 +205,9 @@ ("megatron.bridge.perf_recipes.nemotronh.gb300.nemotronh", "nemotron_3_nano_pretrain_8gpu_gb300_bf16_config"), ("megatron.bridge.perf_recipes.nemotronh.gb300.nemotronh", "nemotron_3_nano_pretrain_8gpu_gb300_fp8mx_config"), ("megatron.bridge.perf_recipes.nemotronh.gb300.nemotronh", "nemotron_3_nano_pretrain_8gpu_gb300_nvfp4_config"), - ("megatron.bridge.perf_recipes.nemotronh.vr200.nemotronh", "nemotron_3_nano_pretrain_8gpu_vr200_bf16_config"), - ("megatron.bridge.perf_recipes.nemotronh.vr200.nemotronh", "nemotron_3_nano_pretrain_8gpu_vr200_fp8mx_config"), - ("megatron.bridge.perf_recipes.nemotronh.vr200.nemotronh", "nemotron_3_nano_pretrain_8gpu_vr200_nvfp4_config"), + ("megatron.bridge.perf_recipes.nemotronh.vrnvl72.nemotronh", "nemotron_3_nano_pretrain_8gpu_vrnvl72_bf16_config"), + ("megatron.bridge.perf_recipes.nemotronh.vrnvl72.nemotronh", "nemotron_3_nano_pretrain_8gpu_vrnvl72_fp8mx_config"), + ("megatron.bridge.perf_recipes.nemotronh.vrnvl72.nemotronh", "nemotron_3_nano_pretrain_8gpu_vrnvl72_nvfp4_config"), ( "megatron.bridge.perf_recipes.nemotronh.h100.nemotronh", "nemotron_3_5_lightning_pretrain_16gpu_h100_bf16_config", @@ -273,12 +273,12 @@ "nemotron_3_5_lightning_pretrain_8gpu_gb300_nvfp4_config", ), ( - "megatron.bridge.perf_recipes.nemotronh.vr200.nemotronh", - "nemotron_3_5_lightning_pretrain_8gpu_vr200_bf16_config", + "megatron.bridge.perf_recipes.nemotronh.vrnvl72.nemotronh", + "nemotron_3_5_lightning_pretrain_8gpu_vrnvl72_bf16_config", ), ( - "megatron.bridge.perf_recipes.nemotronh.vr200.nemotronh", - "nemotron_3_5_lightning_pretrain_8gpu_vr200_fp8mx_config", + "megatron.bridge.perf_recipes.nemotronh.vrnvl72.nemotronh", + "nemotron_3_5_lightning_pretrain_8gpu_vrnvl72_fp8mx_config", ), ) @@ -312,7 +312,7 @@ def test_standard_perf_recipes_do_not_expose_mtp_flag(recipe_factory: Callable[[ *_GB200_RECIPES, *_GB300_RECIPES, *_GB_FSDP_RECIPES, - *_VR200_RECIPES, + *_VRNVL72_RECIPES, ), ids=lambda recipe: recipe.__name__, ) @@ -621,46 +621,46 @@ def test_gb300_perf_recipe_topology(recipe_factory: Callable[[], ConfigContainer @pytest.mark.parametrize( - ("vr200_factory", "gb300_factory"), + ("vrnvl72_factory", "gb300_factory"), ( ( - nemotron_3_5_lightning_pretrain_8gpu_vr200_bf16_config, + nemotron_3_5_lightning_pretrain_8gpu_vrnvl72_bf16_config, nemotron_3_5_lightning_pretrain_8gpu_gb300_bf16_config, ), ( - nemotron_3_5_lightning_pretrain_8gpu_vr200_fp8mx_config, + nemotron_3_5_lightning_pretrain_8gpu_vrnvl72_fp8mx_config, nemotron_3_5_lightning_pretrain_8gpu_gb300_fp8mx_config, ), ), ids=lambda value: value.__name__, ) -def test_vr200_perf_recipes_match_gb300_configs( - vr200_factory: Callable[[], ConfigContainer], +def test_vrnvl72_perf_recipes_match_gb300_configs( + vrnvl72_factory: Callable[[], ConfigContainer], gb300_factory: Callable[[], ConfigContainer], ) -> None: - """VR200 Nemotron 3.5 recipes match their GB300 baselines up to the GB300 NCCL EP overlay. + """VRNVL72 Nemotron 3.5 recipes match their GB300 baselines up to the GB300 NCCL EP overlay. The GB300 recipes default to NCCL EP (dispatcher backend, device-side expert counts and the - NCCL EP process setting); the VR200 aliases keep the shared HybridEP base. The VR200 BF16 + NCCL EP process setting); the VRNVL72 aliases keep the shared HybridEP base. The VRNVL72 BF16 recipe also offloads expert activations. Everything else must be identical. """ - vr200_cfg = vr200_factory() + vrnvl72_cfg = vrnvl72_factory() gb300_cfg = gb300_factory() - assert vr200_cfg.model.moe_flex_dispatcher_backend == "hybridep" + assert vrnvl72_cfg.model.moe_flex_dispatcher_backend == "hybridep" assert gb300_cfg.model.moe_flex_dispatcher_backend == "ncclep" - if vr200_factory is nemotron_3_5_lightning_pretrain_8gpu_vr200_bf16_config: - assert vr200_cfg.model.fine_grained_activation_offloading is True - assert vr200_cfg.model.offload_modules == ["expert_fc1", "moe_act"] - assert vr200_cfg.env_vars["NVTE_CPU_OFFLOAD_V1"] == 1 - assert "graph_capture_record_stream_reuse:True" in vr200_cfg.env_vars["PYTORCH_CUDA_ALLOC_CONF"] - vr200_cfg.model.fine_grained_activation_offloading = gb300_cfg.model.fine_grained_activation_offloading - vr200_cfg.model.offload_modules = gb300_cfg.model.offload_modules - - _enable_ncclep(vr200_cfg) - vr200_cfg.model.moe_use_grouped_tensor = True - vr200_cfg.env_vars = gb300_cfg.env_vars - assert vr200_cfg == gb300_cfg + if vrnvl72_factory is nemotron_3_5_lightning_pretrain_8gpu_vrnvl72_bf16_config: + assert vrnvl72_cfg.model.fine_grained_activation_offloading is True + assert vrnvl72_cfg.model.offload_modules == ["expert_fc1", "moe_act"] + assert vrnvl72_cfg.env_vars["NVTE_CPU_OFFLOAD_V1"] == 1 + assert "graph_capture_record_stream_reuse:True" in vrnvl72_cfg.env_vars["PYTORCH_CUDA_ALLOC_CONF"] + vrnvl72_cfg.model.fine_grained_activation_offloading = gb300_cfg.model.fine_grained_activation_offloading + vrnvl72_cfg.model.offload_modules = gb300_cfg.model.offload_modules + + _enable_ncclep(vrnvl72_cfg) + vrnvl72_cfg.model.moe_use_grouped_tensor = True + vrnvl72_cfg.env_vars = gb300_cfg.env_vars + assert vrnvl72_cfg == gb300_cfg @pytest.mark.parametrize("recipe_factory", _GB_FSDP_RECIPES, ids=lambda recipe: recipe.__name__) diff --git a/tests/unit_tests/recipes/test_nemotronh_recipes.py b/tests/unit_tests/recipes/test_nemotronh_recipes.py index f1c62da2e3..a4ccb58481 100644 --- a/tests/unit_tests/recipes/test_nemotronh_recipes.py +++ b/tests/unit_tests/recipes/test_nemotronh_recipes.py @@ -201,11 +201,11 @@ def test_nemotron_3_nano_gb200_defers_vocab_size_to_training_tokenizer(): id="nano-gb300", ), pytest.param( - "megatron.bridge.perf_recipes.nemotronh.vr200.nemotronh", - "nemotron_3_nano_pretrain_8gpu_vr200_fp8mx_config", + "megatron.bridge.perf_recipes.nemotronh.vrnvl72.nemotronh", + "nemotron_3_nano_pretrain_8gpu_vrnvl72_fp8mx_config", True, 108, - id="nano-vr200", + id="nano-vrnvl72", ), pytest.param( "megatron.bridge.perf_recipes.nemotronh.gb200.nemotronh", @@ -222,11 +222,11 @@ def test_nemotron_3_nano_gb200_defers_vocab_size_to_training_tokenizer(): id="super-gb300", ), pytest.param( - "megatron.bridge.perf_recipes.nemotronh.vr200.nemotronh", - "nemotron_3_super_pretrain_64gpu_vr200_fp8mx_config", + "megatron.bridge.perf_recipes.nemotronh.vrnvl72.nemotronh", + "nemotron_3_super_pretrain_64gpu_vrnvl72_fp8mx_config", False, 32, - id="super-vr200", + id="super-vrnvl72", ), ], ) diff --git a/tests/unit_tests/recipes/test_perf_recipe_environment.py b/tests/unit_tests/recipes/test_perf_recipe_environment.py index 91a2832067..ccf490fe5e 100644 --- a/tests/unit_tests/recipes/test_perf_recipe_environment.py +++ b/tests/unit_tests/recipes/test_perf_recipe_environment.py @@ -46,23 +46,23 @@ "QUANTIZATION_TYPE_DEBUG", "TORCHINDUCTOR_WORKER_START", } -_VR200_CUDNN_LAYERNORM_RECIPES = { - "deepseek_v3_pretrain_64gpu_vr200_fp8mx_proxy_config", - "deepseek_v3_pretrain_128gpu_vr200_fp8mx_config", - "deepseek_v3_pretrain_256gpu_vr200_fp8mx_config", - "deepseek_v4_flash_pretrain_128gpu_vr200_fp8mx_config", - "gpt_oss_20b_pretrain_8gpu_vr200_fp8mx_config", - "gpt_oss_20b_pretrain_8gpu_vr200_nvfp4_config", - "gpt_oss_20b_pretrain_64gpu_vr200_nvfp4_config", - "kimi_k2_pretrain_256gpu_vr200_fp8mx_config", - "llama3_70b_pretrain_64gpu_vr200_bf16_config", - "nemotron_3_nano_pretrain_8gpu_vr200_bf16_config", - "nemotron_3_nano_pretrain_8gpu_vr200_fp8mx_config", - "nemotron_3_nano_pretrain_8gpu_vr200_nvfp4_config", - "nemotron_3_5_lightning_pretrain_8gpu_vr200_bf16_config", - "nemotron_3_5_lightning_pretrain_8gpu_vr200_fp8mx_config", - "nemotron_3_ultra_pretrain_256gpu_vr200_fp8mx_config", - "nemotron_3_ultra_pretrain_256gpu_vr200_nvfp4_config", +_VRNVL72_CUDNN_LAYERNORM_RECIPES = { + "deepseek_v3_pretrain_64gpu_vrnvl72_fp8mx_proxy_config", + "deepseek_v3_pretrain_128gpu_vrnvl72_fp8mx_config", + "deepseek_v3_pretrain_256gpu_vrnvl72_fp8mx_config", + "deepseek_v4_flash_pretrain_128gpu_vrnvl72_fp8mx_config", + "gpt_oss_20b_pretrain_8gpu_vrnvl72_fp8mx_config", + "gpt_oss_20b_pretrain_8gpu_vrnvl72_nvfp4_config", + "gpt_oss_20b_pretrain_64gpu_vrnvl72_nvfp4_config", + "kimi_k2_pretrain_256gpu_vrnvl72_fp8mx_config", + "llama3_70b_pretrain_64gpu_vrnvl72_bf16_config", + "nemotron_3_nano_pretrain_8gpu_vrnvl72_bf16_config", + "nemotron_3_nano_pretrain_8gpu_vrnvl72_fp8mx_config", + "nemotron_3_nano_pretrain_8gpu_vrnvl72_nvfp4_config", + "nemotron_3_5_lightning_pretrain_8gpu_vrnvl72_bf16_config", + "nemotron_3_5_lightning_pretrain_8gpu_vrnvl72_fp8mx_config", + "nemotron_3_ultra_pretrain_256gpu_vrnvl72_fp8mx_config", + "nemotron_3_ultra_pretrain_256gpu_vrnvl72_nvfp4_config", } @@ -195,9 +195,9 @@ def test_explicit_environment_invariants_across_all_flat_recipes(): cudnn_names = {"NVTE_NORM_BWD_USE_CUDNN", "NVTE_NORM_FWD_USE_CUDNN"} assert environment.keys().isdisjoint(cudnn_names) or environment.keys() >= cudnn_names - if path.parent.name == "vr200": + if path.parent.name == "vrnvl72": assert environment["CUDA_DEVICE_MAX_CONNECTIONS"] == 32 - uses_cudnn_layernorm = function_name in _VR200_CUDNN_LAYERNORM_RECIPES + uses_cudnn_layernorm = function_name in _VRNVL72_CUDNN_LAYERNORM_RECIPES assert (environment.keys() >= cudnn_names) == uses_cudnn_layernorm if uses_cudnn_layernorm: assert all(environment[name] == 1 for name in cudnn_names) @@ -206,7 +206,7 @@ def test_explicit_environment_invariants_across_all_flat_recipes(): assert not hybrid_ep_names or hybrid_ep_names == _HYBRID_EP_ENV_NAMES if hybrid_ep_names: gpu = path.parent.name - nvlink_domain_size = 72 if gpu in {"gb200", "gb300", "vr200"} else 8 + nvlink_domain_size = 72 if gpu in {"gb200", "gb300", "vrnvl72"} else 8 assert environment["NVLINK_DOMAIN_SIZE"] == nvlink_domain_size assert environment["USE_MNNVL"] == int(nvlink_domain_size == 72) assert environment["NUM_OF_HYBRID_EP_RANKS_PER_NVLINK_DOMAIN"] <= nvlink_domain_size diff --git a/tests/unit_tests/recipes/test_qwen_perf_recipes.py b/tests/unit_tests/recipes/test_qwen_perf_recipes.py index 039bdfe541..73e13b317c 100644 --- a/tests/unit_tests/recipes/test_qwen_perf_recipes.py +++ b/tests/unit_tests/recipes/test_qwen_perf_recipes.py @@ -31,7 +31,7 @@ qwen3_30b_a3b_pretrain_8gpu_gb200_nvfp4_config, qwen3_30b_a3b_pretrain_8gpu_gb300_fp8cs_config, qwen3_30b_a3b_pretrain_8gpu_gb300_nvfp4_config, - qwen3_30b_a3b_pretrain_8gpu_vr200_nvfp4_config, + qwen3_30b_a3b_pretrain_8gpu_vrnvl72_nvfp4_config, qwen3_235b_a22b_pretrain_64gpu_b200_fp8cs_config, qwen3_235b_a22b_pretrain_64gpu_b200_nvfp4_config, qwen3_235b_a22b_pretrain_64gpu_b300_fp8cs_config, @@ -52,7 +52,7 @@ qwen3_235b_a22b_pretrain_256gpu_gb200_nvfp4_config, qwen3_235b_a22b_pretrain_256gpu_gb300_fp8cs_config, qwen3_235b_a22b_pretrain_256gpu_gb300_nvfp4_config, - qwen3_235b_a22b_pretrain_256gpu_vr200_nvfp4_config, + qwen3_235b_a22b_pretrain_256gpu_vrnvl72_nvfp4_config, ) @@ -85,7 +85,7 @@ def test_qwen3_235b_64gpu_blackwell_topology_is_valid( qwen3_30b_a3b_pretrain_8gpu_gb300_nvfp4_config, qwen3_30b_a3b_pretrain_8gpu_b200_nvfp4_config, qwen3_30b_a3b_pretrain_8gpu_b300_nvfp4_config, - qwen3_30b_a3b_pretrain_8gpu_vr200_nvfp4_config, + qwen3_30b_a3b_pretrain_8gpu_vrnvl72_nvfp4_config, qwen3_235b_a22b_pretrain_64gpu_gb200_nvfp4_config, qwen3_235b_a22b_pretrain_256gpu_gb200_nvfp4_config, qwen3_235b_a22b_pretrain_64gpu_gb300_nvfp4_config, @@ -94,7 +94,7 @@ def test_qwen3_235b_64gpu_blackwell_topology_is_valid( qwen3_235b_a22b_pretrain_256gpu_b200_nvfp4_config, qwen3_235b_a22b_pretrain_64gpu_b300_nvfp4_config, qwen3_235b_a22b_pretrain_256gpu_b300_nvfp4_config, - qwen3_235b_a22b_pretrain_256gpu_vr200_nvfp4_config, + qwen3_235b_a22b_pretrain_256gpu_vrnvl72_nvfp4_config, ], ) def test_nvfp4_disables_tp_comm_overlap(nvfp4_config_fn): diff --git a/tests/unit_tests/scripts/performance/test_argument_parser.py b/tests/unit_tests/scripts/performance/test_argument_parser.py new file mode 100644 index 0000000000..c78a916d82 --- /dev/null +++ b/tests/unit_tests/scripts/performance/test_argument_parser.py @@ -0,0 +1,89 @@ +# Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Tests for the performance launcher's GPU argument.""" + +import importlib.util +import logging +import sys +import types +from pathlib import Path +from unittest.mock import patch + +import pytest + + +pytestmark = pytest.mark.unit + +_ARGUMENT_PARSER = Path(__file__).resolve().parents[4] / "scripts" / "performance" / "argument_parser.py" +_REQUIRED_ARGS = ["--model_family_name", "llama", "--model_recipe_name", "llama3_8b", "--num_gpus", "8"] + + +def _load_argument_parser(): + """Load argument_parser.py with a stub nemo_run, which it uses only for a help-text default.""" + nemo_run = types.ModuleType("nemo_run") + nemo_run_config = types.ModuleType("nemo_run.config") + nemo_run_config.get_nemorun_home = lambda: "/nemo_run" + nemo_run.config = nemo_run_config + spec = importlib.util.spec_from_file_location("test_performance_argument_parser", _ARGUMENT_PARSER) + assert spec is not None and spec.loader is not None + module = importlib.util.module_from_spec(spec) + with patch.dict(sys.modules, {"nemo_run": nemo_run, "nemo_run.config": nemo_run_config}): + spec.loader.exec_module(module) + return module + + +def test_deprecated_gpu_name_maps_to_vrnvl72_with_warning(caplog, monkeypatch): + argument_parser = _load_argument_parser() + monkeypatch.delenv("RANK", raising=False) + monkeypatch.delenv("SLURM_PROCID", raising=False) + + with caplog.at_level(logging.WARNING): + args = argument_parser.parse_cli_args().parse_args([*_REQUIRED_ARGS, "--gpu", "vr200"]) + + assert args.gpu == "vrnvl72" + assert "--gpu vr200 is deprecated; use --gpu vrnvl72." in caplog.text + + +@pytest.mark.parametrize("rank_variable", ["RANK", "SLURM_PROCID"]) +def test_deprecated_gpu_name_maps_without_warning_on_nonzero_ranks(caplog, monkeypatch, rank_variable): + argument_parser = _load_argument_parser() + monkeypatch.delenv("RANK", raising=False) + monkeypatch.delenv("SLURM_PROCID", raising=False) + monkeypatch.setenv(rank_variable, "3") + + with caplog.at_level(logging.WARNING): + args = argument_parser.parse_cli_args().parse_args([*_REQUIRED_ARGS, "--gpu", "vr200"]) + + assert args.gpu == "vrnvl72" + assert "deprecated" not in caplog.text + + +def test_current_gpu_name_is_unchanged_without_warning(caplog): + argument_parser = _load_argument_parser() + + with caplog.at_level(logging.WARNING): + args = argument_parser.parse_cli_args().parse_args([*_REQUIRED_ARGS, "--gpu", "vrnvl72"]) + + assert args.gpu == "vrnvl72" + assert "deprecated" not in caplog.text + assert argument_parser.NUM_GPUS_PER_NODE_MAP[args.gpu] == 4 + + +def test_only_current_gpu_names_are_choices(): + argument_parser = _load_argument_parser() + + assert "vr200" not in argument_parser.NUM_GPUS_PER_NODE_MAP + with pytest.raises(SystemExit): + argument_parser.parse_cli_args().parse_args([*_REQUIRED_ARGS, "--gpu", "vr2000"]) diff --git a/tests/unit_tests/scripts/performance/test_executors.py b/tests/unit_tests/scripts/performance/test_executors.py index da1af7342b..036b4d470e 100644 --- a/tests/unit_tests/scripts/performance/test_executors.py +++ b/tests/unit_tests/scripts/performance/test_executors.py @@ -199,9 +199,9 @@ def test_recipe_env_vars_are_exported_and_forced_into_container(tmp_path): @pytest.mark.skipif(not HAS_NEMO_RUN, reason="nemo_run not installed") -def test_vr200_slurm_executor_uses_two_gpus_per_numa_node(tmp_path): +def test_vrnvl72_slurm_executor_uses_two_gpus_per_numa_node(tmp_path): executor = slurm_executor( - gpu="vr200", + gpu="vrnvl72", account="test", partition="test", log_dir=str(tmp_path), diff --git a/tests/unit_tests/scripts/performance/test_qwen35_vl_workload_base_configs.py b/tests/unit_tests/scripts/performance/test_qwen35_vl_workload_base_configs.py index 63e80b51c0..ab0d37c5ee 100644 --- a/tests/unit_tests/scripts/performance/test_qwen35_vl_workload_base_configs.py +++ b/tests/unit_tests/scripts/performance/test_qwen35_vl_workload_base_configs.py @@ -46,13 +46,13 @@ qwen35_vl_122b_a10b_pretrain_128gpu_h100_bf16_config, qwen35_vl_122b_a10b_pretrain_128gpu_h100_fp8cs_config, ) -from megatron.bridge.perf_recipes.qwen_vl.vr200.qwen35_vl import ( - qwen35_vl_35b_a3b_pretrain_8gpu_vr200_bf16_config, - qwen35_vl_35b_a3b_pretrain_8gpu_vr200_fp8cs_config, - qwen35_vl_35b_a3b_pretrain_8gpu_vr200_fp8mx_config, - qwen35_vl_397b_a17b_pretrain_64gpu_vr200_bf16_config, - qwen35_vl_397b_a17b_pretrain_64gpu_vr200_fp8cs_config, - qwen35_vl_397b_a17b_pretrain_64gpu_vr200_fp8mx_config, +from megatron.bridge.perf_recipes.qwen_vl.vrnvl72.qwen35_vl import ( + qwen35_vl_35b_a3b_pretrain_8gpu_vrnvl72_bf16_config, + qwen35_vl_35b_a3b_pretrain_8gpu_vrnvl72_fp8cs_config, + qwen35_vl_35b_a3b_pretrain_8gpu_vrnvl72_fp8mx_config, + qwen35_vl_397b_a17b_pretrain_64gpu_vrnvl72_bf16_config, + qwen35_vl_397b_a17b_pretrain_64gpu_vrnvl72_fp8cs_config, + qwen35_vl_397b_a17b_pretrain_64gpu_vrnvl72_fp8mx_config, ) from megatron.bridge.utils.cuda_graph import cuda_graph_module_names from tests.unit_tests.recipes.recipe_test_utils import ( @@ -364,15 +364,15 @@ def test_qwen35_vl_122b_gb300_keeps_cuda_graphs_disabled(monkeypatch: pytest.Mon qwen35_vl_397b_a17b_pretrain_64gpu_gb300_bf16_config, qwen35_vl_397b_a17b_pretrain_64gpu_gb300_fp8cs_config, qwen35_vl_397b_a17b_pretrain_64gpu_gb300_fp8mx_config, - qwen35_vl_397b_a17b_pretrain_64gpu_vr200_bf16_config, - qwen35_vl_397b_a17b_pretrain_64gpu_vr200_fp8cs_config, - qwen35_vl_397b_a17b_pretrain_64gpu_vr200_fp8mx_config, + qwen35_vl_397b_a17b_pretrain_64gpu_vrnvl72_bf16_config, + qwen35_vl_397b_a17b_pretrain_64gpu_vrnvl72_fp8cs_config, + qwen35_vl_397b_a17b_pretrain_64gpu_vrnvl72_fp8mx_config, ], ) def test_qwen35_vl_397b_hybridep_domain_matches_expert_parallel_size( recipe_fn: Callable, monkeypatch: pytest.MonkeyPatch ) -> None: - """The VR200 aliases inherit EP from GB300 but restate the HybridEP env inline. + """The VRNVL72 aliases inherit EP from GB300 but restate the HybridEP env inline. HybridEP asserts that the EP group size is divisible by ``NUM_OF_HYBRID_EP_RANKS_PER_NVLINK_DOMAIN``, and the launcher only re-derives @@ -395,14 +395,14 @@ def test_qwen35_vl_397b_hybridep_domain_matches_expert_parallel_size( qwen35_vl_397b_a17b_pretrain_64gpu_gb300_fp8cs_config, qwen35_vl_397b_a17b_pretrain_64gpu_gb300_fp8mx_config, ) -# VR200 aliases built from those recipes; they keep FLA until cuDNN GDN is measured on VR200. -_VR200_CUDNN_GDN_ALIASES = ( - qwen35_vl_35b_a3b_pretrain_8gpu_vr200_bf16_config, - qwen35_vl_35b_a3b_pretrain_8gpu_vr200_fp8cs_config, - qwen35_vl_35b_a3b_pretrain_8gpu_vr200_fp8mx_config, - qwen35_vl_397b_a17b_pretrain_64gpu_vr200_bf16_config, - qwen35_vl_397b_a17b_pretrain_64gpu_vr200_fp8cs_config, - qwen35_vl_397b_a17b_pretrain_64gpu_vr200_fp8mx_config, +# VRNVL72 aliases built from those recipes; they keep FLA until cuDNN GDN is measured on VRNVL72. +_VRNVL72_CUDNN_GDN_ALIASES = ( + qwen35_vl_35b_a3b_pretrain_8gpu_vrnvl72_bf16_config, + qwen35_vl_35b_a3b_pretrain_8gpu_vrnvl72_fp8cs_config, + qwen35_vl_35b_a3b_pretrain_8gpu_vrnvl72_fp8mx_config, + qwen35_vl_397b_a17b_pretrain_64gpu_vrnvl72_bf16_config, + qwen35_vl_397b_a17b_pretrain_64gpu_vrnvl72_fp8cs_config, + qwen35_vl_397b_a17b_pretrain_64gpu_vrnvl72_fp8mx_config, ) _QWEN35_VL_PERF_RECIPES = tuple( factory @@ -439,7 +439,7 @@ def test_qwen35_vl_cudnn_gdn_is_limited_to_gb300_35b_397b( ) -> None: """Only the measured GB300 35B/397B recipes leave FLA. - 122B, B200, B300, GB200 and VR200 were not measured (the VR200 aliases inherit the GB300 model config and reset + 122B, B200, B300, GB200 and VRNVL72 were not measured (the VRNVL72 aliases inherit the GB300 model config and reset to FLA), and H100 is SM90, outside cuDNN's fast GDN engine. """ patch_recipe_construction_dependencies(monkeypatch) @@ -450,7 +450,7 @@ def test_qwen35_vl_cudnn_gdn_is_limited_to_gb300_35b_397b( assert config.model.gdn_kernel_backend == expected -@pytest.mark.parametrize("recipe_fn", _GB300_CUDNN_GDN_RECIPES + _VR200_CUDNN_GDN_ALIASES, ids=recipe_factory_id) +@pytest.mark.parametrize("recipe_fn", _GB300_CUDNN_GDN_RECIPES + _VRNVL72_CUDNN_GDN_ALIASES, ids=recipe_factory_id) def test_qwen35_vl_gdn_kernel_backend_not_invented_on_older_core( recipe_fn: Callable, monkeypatch: pytest.MonkeyPatch ) -> None: @@ -522,7 +522,7 @@ def test_megatron_core_gdn_kernel_backend_contract() -> None: def test_qwen35_vl_perf_recipe_discovery_covers_the_cudnn_gdn_recipes() -> None: """The recipe matrix above must keep finding every recipe the cuDNN GDN tests reason about.""" discovered = set(_QWEN35_VL_PERF_RECIPES) - assert set(_GB300_CUDNN_GDN_RECIPES + _VR200_CUDNN_GDN_ALIASES) <= discovered + assert set(_GB300_CUDNN_GDN_RECIPES + _VRNVL72_CUDNN_GDN_ALIASES) <= discovered platforms = {factory.__module__.split(".")[-2] for factory in discovered} - assert {"b200", "b300", "gb200", "gb300", "h100", "vr200"} <= platforms + assert {"b200", "b300", "gb200", "gb300", "h100", "vrnvl72"} <= platforms assert any("122b" in factory.__name__ for factory in discovered) diff --git a/tests/unit_tests/scripts/performance/test_recipe_environment.py b/tests/unit_tests/scripts/performance/test_recipe_environment.py index 2e757fd68a..87b0610f03 100644 --- a/tests/unit_tests/scripts/performance/test_recipe_environment.py +++ b/tests/unit_tests/scripts/performance/test_recipe_environment.py @@ -74,7 +74,7 @@ def _install_lightweight_environment_utils() -> None: @pytest.mark.parametrize( ("gpu", "ep_size", "expected_ranks", "expected_domain", "expected_mnnvl"), - [("h100", 32, 8, 8, 0), ("gb200", 32, 32, 72, 1), ("vr200", 64, 64, 72, 1)], + [("h100", 32, 8, 8, 0), ("gb200", 32, 32, 72, 1), ("vrnvl72", 64, 64, 72, 1)], ) def test_target_topology_adapts_only_hybridep(gpu, ep_size, expected_ranks, expected_domain, expected_mnnvl): config = SimpleNamespace( @@ -278,7 +278,7 @@ def test_flat_environment_preparation_defaults_missing_recipe_environment(model_ comm_overlap=None, ) args = SimpleNamespace( - gpu="vr200", + gpu="vrnvl72", moe_a2a_overlap=None, tensor_model_parallel_size=None, pipeline_model_parallel_size=None, @@ -371,7 +371,7 @@ def test_exact_gpu_recipe_takes_precedence_over_canonical_fallback(monkeypatch): @pytest.mark.unit -@pytest.mark.parametrize("gpu", ["gb200", "gb300", "vr200"]) +@pytest.mark.parametrize("gpu", ["gb200", "gb300", "vrnvl72"]) @pytest.mark.parametrize("precision", ["fp8_mx", "nvfp4"]) @pytest.mark.parametrize("override", [None, 4, 8]) def test_ultra_weak_scaling_resolves_hsdp_before_user_overrides(monkeypatch, gpu, precision, override): @@ -599,7 +599,7 @@ def test_flat_hydra_ep_override_updates_hybridep_topology_environment(monkeypatc comm_overlap=None, ) args = SimpleNamespace( - gpu="vr200", + gpu="vrnvl72", moe_a2a_overlap=None, tensor_model_parallel_size=None, pipeline_model_parallel_size=None, @@ -918,7 +918,7 @@ def test_flat_non_ncclep_backends_keep_hybridep_environment(dispatcher_backend): assert recipe.env_vars == original_env -def test_vr200_argparse_overrides_keep_sm100_cuda_connection_count(): +def test_vrnvl72_argparse_overrides_keep_sm100_cuda_connection_count(): from utils.overrides import _apply_flat_cli_environment_compatibility recipe = SimpleNamespace( @@ -931,7 +931,7 @@ def test_vr200_argparse_overrides_keep_sm100_cuda_connection_count(): ), ) args = SimpleNamespace( - gpu="vr200", + gpu="vrnvl72", moe_a2a_overlap=None, tensor_model_parallel_size=2, pipeline_model_parallel_size=None, diff --git a/tests/unit_tests/scripts/performance/test_setup_experiment.py b/tests/unit_tests/scripts/performance/test_setup_experiment.py index 8cae2d1c57..56f3cebd6c 100644 --- a/tests/unit_tests/scripts/performance/test_setup_experiment.py +++ b/tests/unit_tests/scripts/performance/test_setup_experiment.py @@ -42,10 +42,10 @@ def test_default_experiment_name_uses_only_cli_metadata() -> None: task="pretrain", compute_dtype="fp8_mx", num_gpus=256, - gpu="vr200", + gpu="vrnvl72", config_variant="large_scale", ) - == "pretrain_deepseek_v3_fp8_mx_gpus256_vr200_large_scale" + == "pretrain_deepseek_v3_fp8_mx_gpus256_vrnvl72_large_scale" ) assert ( setup_experiment._default_experiment_name( @@ -88,8 +88,18 @@ def test_recipe_arguments_are_forwarded_unchanged() -> None: ] +@pytest.mark.parametrize( + ("gpu", "gpus_per_node", "expected_gpu"), + [ + ("h100", "8", "h100"), + # The deprecated name must reach main() as vrnvl72, which applies the 4752 MHz memory clock default. + ("vr200", "4", "vrnvl72"), + ], +) @pytest.mark.parametrize("is_long_convergence_run", [False, True]) -def test_submission_dry_run_does_not_import_bridge_or_mcore(tmp_path: Path, is_long_convergence_run: bool) -> None: +def test_submission_dry_run_does_not_import_bridge_or_mcore( + tmp_path: Path, is_long_convergence_run: bool, gpu: str, gpus_per_node: str, expected_gpu: str +) -> None: blocker_dir = tmp_path / "login_node" blocker_dir.mkdir() (blocker_dir / "sitecustomize.py").write_text( @@ -112,6 +122,9 @@ def find_spec(self, fullname, path=None, target=None): """ ) environment = os.environ.copy() + # Non-zero ranks skip the deprecated --gpu warning that this test expects from the launcher. + environment.pop("RANK", None) + environment.pop("SLURM_PROCID", None) environment["NEMORUN_HOME"] = str(tmp_path / "nemorun") environment["PYTHONPATH"] = os.pathsep.join( value for value in (str(blocker_dir), environment.get("PYTHONPATH")) if value @@ -126,9 +139,9 @@ def find_spec(self, fullname, path=None, target=None): "--num_gpus", "8", "--gpus_per_node", - "8", + gpus_per_node, "--gpu", - "h100", + gpu, "--account", "test-account", "--partition", @@ -155,7 +168,10 @@ def find_spec(self, fullname, path=None, target=None): output = result.stdout + result.stderr assert result.returncode == 0, output assert "bootstrap.py" in output - assert "pretrain_llama3_8b_bf16_gpus8_h100" in output + assert f"pretrain_llama3_8b_bf16_gpus8_{expected_gpu}" in output + assert ("--gpu vr200 is deprecated; use --gpu vrnvl72." in output) == (gpu == "vr200") + # The dry-run sbatch dump wraps at spaces, so match the clock value as one token. + assert ("4752,4752" in output) == (expected_gpu == "vrnvl72") assert "WANDB_RUN_ID" in output assert "WANDB_RESUME" in output assert "login-node import forbidden" not in output diff --git a/tests/unit_tests/scripts/training/test_recipe_metadata.py b/tests/unit_tests/scripts/training/test_recipe_metadata.py index c7c3cd74f7..018c41a5cb 100644 --- a/tests/unit_tests/scripts/training/test_recipe_metadata.py +++ b/tests/unit_tests/scripts/training/test_recipe_metadata.py @@ -18,6 +18,7 @@ import ast import importlib.util +import logging import re import sys from pathlib import Path @@ -98,6 +99,61 @@ def test_metadata_does_not_impose_a_hardware_node_shape(): assert metadata.hardware == "h100" +def test_deprecated_hardware_name_resolves_to_renamed_recipe(caplog, monkeypatch): + module = _load_module() + legacy_name = "qwen3_30b_a3b_pretrain_8gpu_vr200_bf16_config" + monkeypatch.delenv("RANK", raising=False) + monkeypatch.delenv("SLURM_PROCID", raising=False) + + with caplog.at_level(logging.WARNING): + metadata = module.selected_benchmark_recipe(["--recipe", legacy_name]) + + assert metadata is not None + assert metadata.recipe_name == "qwen3_30b_a3b_pretrain_8gpu_vrnvl72_bf16_config" + assert metadata.hardware == "vrnvl72" + assert f"Recipe '{legacy_name}' uses a deprecated hardware name" in caplog.text + assert module.available_benchmark_recipe_metadata(legacy_name) is None + + +@pytest.mark.parametrize("rank_variable", ["RANK", "SLURM_PROCID"]) +def test_deprecated_hardware_name_resolves_without_warning_on_nonzero_ranks(caplog, monkeypatch, rank_variable): + module = _load_module() + monkeypatch.delenv("RANK", raising=False) + monkeypatch.delenv("SLURM_PROCID", raising=False) + monkeypatch.setenv(rank_variable, "3") + + with caplog.at_level(logging.WARNING): + metadata = module.resolved_benchmark_recipe_metadata("qwen3_30b_a3b_pretrain_8gpu_vr200_bf16_config") + + assert metadata is not None + assert metadata.recipe_name == "qwen3_30b_a3b_pretrain_8gpu_vrnvl72_bf16_config" + assert "deprecated" not in caplog.text + + +def test_deprecated_hardware_name_without_renamed_recipe_is_not_rewritten(caplog, monkeypatch): + module = _load_module() + monkeypatch.delenv("RANK", raising=False) + monkeypatch.delenv("SLURM_PROCID", raising=False) + + with caplog.at_level(logging.WARNING): + # qwen3_30b_a3b has no VRNVL72 fp8cs benchmark to redirect to. + metadata = module.resolved_benchmark_recipe_metadata("qwen3_30b_a3b_pretrain_8gpu_vr200_fp8cs_config") + + assert metadata is None + assert "deprecated" not in caplog.text + + +def test_current_hardware_name_resolves_without_deprecation_warning(caplog): + module = _load_module() + + with caplog.at_level(logging.WARNING): + metadata = module.resolved_benchmark_recipe_metadata("qwen3_30b_a3b_pretrain_8gpu_vrnvl72_bf16_config") + + assert metadata is not None + assert metadata.hardware == "vrnvl72" + assert "deprecated" not in caplog.text + + @pytest.mark.parametrize( ("recipe_name", "task", "step_name"), [ diff --git a/tests/unit_tests/scripts/training/test_recipe_runner.py b/tests/unit_tests/scripts/training/test_recipe_runner.py index ae70650fdf..6204aa74d4 100644 --- a/tests/unit_tests/scripts/training/test_recipe_runner.py +++ b/tests/unit_tests/scripts/training/test_recipe_runner.py @@ -94,7 +94,9 @@ def benchmark_recipe() -> object: library_finder = Mock() benchmark_finder = Mock(return_value=benchmark_recipe) - monkeypatch.setattr(recipe_runner, "resolved_benchmark_recipe_metadata", lambda _name: object()) + monkeypatch.setattr( + recipe_runner, "resolved_benchmark_recipe_metadata", lambda name: SimpleNamespace(recipe_name=name) + ) monkeypatch.setattr(recipe_runner, "find_library_recipe", library_finder) monkeypatch.setattr(recipe_runner, "find_benchmark_recipe", benchmark_finder) @@ -103,6 +105,20 @@ def benchmark_recipe() -> object: library_finder.assert_not_called() +def test_load_recipe_loads_renamed_benchmark_for_deprecated_hardware_name( + recipe_runner: ModuleType, monkeypatch: pytest.MonkeyPatch +) -> None: + config = object() + benchmark_finder = Mock(return_value=lambda: config) + library_finder = Mock() + monkeypatch.setattr(recipe_runner, "find_benchmark_recipe", benchmark_finder) + monkeypatch.setattr(recipe_runner, "find_library_recipe", library_finder) + + assert recipe_runner.load_recipe("qwen3_30b_a3b_pretrain_8gpu_vr200_bf16_config") is config + benchmark_finder.assert_called_once_with("qwen3_30b_a3b_pretrain_8gpu_vrnvl72_bf16_config") + library_finder.assert_not_called() + + def test_load_recipe_reports_both_packages_when_missing( recipe_runner: ModuleType, monkeypatch: pytest.MonkeyPatch ) -> None: @@ -119,7 +135,9 @@ def test_duplicate_name_warns_and_selects_benchmark( recipe_name = "qwen3_235b_a22b_pretrain_256gpu_h100_bf16_config" config = object() - monkeypatch.setattr(recipe_runner, "resolved_benchmark_recipe_metadata", lambda _name: object()) + monkeypatch.setattr( + recipe_runner, "resolved_benchmark_recipe_metadata", lambda name: SimpleNamespace(recipe_name=name) + ) benchmark_finder = Mock(return_value=lambda: config) library_finder = Mock() monkeypatch.setattr(recipe_runner, "find_benchmark_recipe", benchmark_finder) @@ -146,7 +164,9 @@ def test_finetuning_collision_selects_benchmark( ) -> None: config = object() - monkeypatch.setattr(recipe_runner, "resolved_benchmark_recipe_metadata", lambda _name: object()) + monkeypatch.setattr( + recipe_runner, "resolved_benchmark_recipe_metadata", lambda name: SimpleNamespace(recipe_name=name) + ) library_finder = Mock() benchmark_finder = Mock(return_value=lambda: config) monkeypatch.setattr(recipe_runner, "find_library_recipe", library_finder) diff --git a/tests/unit_tests/scripts/training/test_run_recipe.py b/tests/unit_tests/scripts/training/test_run_recipe.py index b3429646d9..b408a41ecd 100644 --- a/tests/unit_tests/scripts/training/test_run_recipe.py +++ b/tests/unit_tests/scripts/training/test_run_recipe.py @@ -616,7 +616,7 @@ def apply_overrides(recipe, overrides): module.main( [ "--recipe", - "qwen3_235b_a22b_pretrain_256gpu_vr200_nvfp4_config", + "qwen3_235b_a22b_pretrain_256gpu_vrnvl72_nvfp4_config", "--mode", "pretrain", "--dry-run", diff --git a/tests/unit_tests/scripts/training/test_setup_experiment.py b/tests/unit_tests/scripts/training/test_setup_experiment.py index a7a7ef05e3..9d82a0c844 100644 --- a/tests/unit_tests/scripts/training/test_setup_experiment.py +++ b/tests/unit_tests/scripts/training/test_setup_experiment.py @@ -263,10 +263,10 @@ def test_parser_consumes_peak_mem_clk(option): @pytest.mark.parametrize( ("requested_peak_mem_clk", "hardware", "expected"), [ - (None, "vr200", 4752), + (None, "vrnvl72", 4752), (None, "h100", None), - (2600, "vr200", 2600), - (-1, "vr200", None), + (2600, "vrnvl72", 2600), + (-1, "vrnvl72", None), ], ) def test_peak_mem_clk_resolution(requested_peak_mem_clk, hardware, expected): @@ -299,7 +299,15 @@ def test_peak_mem_clk_is_applied_once_per_slurm_node(): assert "sudo nvidia-smi -lmc 4752,4752" in executor.setup_lines -def test_main_applies_vr200_peak_mem_clk_default(monkeypatch): +@pytest.mark.parametrize( + "recipe_name", + [ + "qwen3_30b_a3b_pretrain_8gpu_vrnvl72_bf16_config", + # The deprecated hardware name resolves to the same benchmark recipe. + "qwen3_30b_a3b_pretrain_8gpu_vr200_bf16_config", + ], +) +def test_main_applies_vrnvl72_peak_mem_clk_default(monkeypatch, recipe_name): module = _load_setup_experiment_module() configured_clocks = [] sentinel_executor = object() @@ -348,7 +356,7 @@ def dryrun(self): "image.sqsh", "--submission-dry-run", "--recipe", - "qwen3_30b_a3b_pretrain_8gpu_vr200_bf16_config", + recipe_name, ] )