2626 nemotron_3_5_lightning_pretrain_8gpu_gb200_fp8mx_config ,
2727 nemotron_3_5_lightning_pretrain_8gpu_gb200_fp8mx_fsdp_config ,
2828 nemotron_3_5_lightning_pretrain_8gpu_gb200_nvfp4_config ,
29+ nemotron_3_5_lightning_pretrain_8gpu_gb300_bf16_config ,
30+ nemotron_3_5_lightning_pretrain_8gpu_gb300_fp8mx_config ,
31+ nemotron_3_5_lightning_pretrain_8gpu_gb300_fp8mx_fsdp_config ,
32+ nemotron_3_5_lightning_pretrain_8gpu_gb300_nvfp4_config ,
2933 nemotron_3_5_lightning_pretrain_16gpu_h100_bf16_config ,
3034 nemotron_3_5_lightning_pretrain_16gpu_h100_fp8cs_config ,
3135 nemotron_3_nano_pretrain_8gpu_gb200_bf16_config ,
3236 nemotron_3_nano_pretrain_8gpu_gb200_fp8mx_config ,
3337 nemotron_3_nano_pretrain_8gpu_gb200_nvfp4_config ,
38+ nemotron_3_nano_pretrain_8gpu_gb300_bf16_config ,
39+ nemotron_3_nano_pretrain_8gpu_gb300_fp8mx_config ,
40+ nemotron_3_nano_pretrain_8gpu_gb300_nvfp4_config ,
3441 nemotron_3_nano_pretrain_16gpu_h100_bf16_config ,
3542 nemotron_3_nano_pretrain_16gpu_h100_fp8cs_config ,
3643)
5158 nemotron_3_5_lightning_pretrain_8gpu_gb200_fp8mx_config ,
5259 nemotron_3_5_lightning_pretrain_8gpu_gb200_nvfp4_config ,
5360)
54- _GB200_FSDP_RECIPES = (nemotron_3_5_lightning_pretrain_8gpu_gb200_fp8mx_fsdp_config ,)
61+ _GB300_RECIPES = (
62+ nemotron_3_5_lightning_pretrain_8gpu_gb300_bf16_config ,
63+ nemotron_3_5_lightning_pretrain_8gpu_gb300_fp8mx_config ,
64+ nemotron_3_5_lightning_pretrain_8gpu_gb300_nvfp4_config ,
65+ )
66+ _GB_FSDP_RECIPES = (
67+ nemotron_3_5_lightning_pretrain_8gpu_gb200_fp8mx_fsdp_config ,
68+ nemotron_3_5_lightning_pretrain_8gpu_gb300_fp8mx_fsdp_config ,
69+ )
5570_NEMOTRON_3_RECIPES = (
5671 nemotron_3_nano_pretrain_16gpu_h100_bf16_config ,
5772 nemotron_3_nano_pretrain_16gpu_h100_fp8cs_config ,
5873 nemotron_3_nano_pretrain_8gpu_gb200_bf16_config ,
5974 nemotron_3_nano_pretrain_8gpu_gb200_fp8mx_config ,
6075 nemotron_3_nano_pretrain_8gpu_gb200_nvfp4_config ,
76+ nemotron_3_nano_pretrain_8gpu_gb300_bf16_config ,
77+ nemotron_3_nano_pretrain_8gpu_gb300_fp8mx_config ,
78+ nemotron_3_nano_pretrain_8gpu_gb300_nvfp4_config ,
6179)
6280_NEMOTRON_3_5_BASE_RECIPE_PAIRS = (
6381 (
8098 nemotron_3_5_lightning_pretrain_8gpu_gb200_nvfp4_config ,
8199 nemotron_3_nano_pretrain_8gpu_gb200_nvfp4_config ,
82100 ),
101+ (
102+ nemotron_3_5_lightning_pretrain_8gpu_gb300_bf16_config ,
103+ nemotron_3_nano_pretrain_8gpu_gb300_bf16_config ,
104+ ),
105+ (
106+ nemotron_3_5_lightning_pretrain_8gpu_gb300_fp8mx_config ,
107+ nemotron_3_nano_pretrain_8gpu_gb300_fp8mx_config ,
108+ ),
109+ (
110+ nemotron_3_5_lightning_pretrain_8gpu_gb300_nvfp4_config ,
111+ nemotron_3_nano_pretrain_8gpu_gb300_nvfp4_config ,
112+ ),
83113)
84114_NEMOTRON_NANO_PERF_FACTORIES = (
85115 ("megatron.bridge.perf_recipes.nemotronh.h100.nemotronh" , "nemotron_3_nano_pretrain_16gpu_h100_bf16_config" ),
123153 "megatron.bridge.perf_recipes.nemotronh.gb200.nemotronh" ,
124154 "nemotron_3_5_lightning_pretrain_8gpu_gb200_nvfp4_config" ,
125155 ),
156+ (
157+ "megatron.bridge.perf_recipes.nemotronh.gb300.nemotronh" ,
158+ "nemotron_3_5_lightning_pretrain_8gpu_gb300_bf16_config" ,
159+ ),
160+ (
161+ "megatron.bridge.perf_recipes.nemotronh.gb300.nemotronh" ,
162+ "nemotron_3_5_lightning_pretrain_8gpu_gb300_fp8mx_config" ,
163+ ),
164+ (
165+ "megatron.bridge.perf_recipes.nemotronh.gb300.nemotronh" ,
166+ "nemotron_3_5_lightning_pretrain_8gpu_gb300_fp8mx_fsdp_config" ,
167+ ),
168+ (
169+ "megatron.bridge.perf_recipes.nemotronh.gb300.nemotronh" ,
170+ "nemotron_3_5_lightning_pretrain_8gpu_gb300_nvfp4_config" ,
171+ ),
126172)
127173
128174
@@ -148,7 +194,7 @@ def test_standard_perf_recipes_do_not_expose_mtp_flag(recipe_factory: Callable[[
148194
149195@pytest .mark .parametrize (
150196 "recipe_factory" ,
151- (* _H100_RECIPES , * _GB200_RECIPES , * _GB200_FSDP_RECIPES ),
197+ (* _H100_RECIPES , * _GB200_RECIPES , * _GB300_RECIPES , * _GB_FSDP_RECIPES ),
152198 ids = lambda recipe : recipe .__name__ ,
153199)
154200def test_perf_recipes_enable_mtp (recipe_factory : Callable [[], ConfigContainer ]) -> None :
@@ -188,24 +234,33 @@ def test_nemotron_3_5_perf_recipes_inherit_nemotron_3_policy(
188234 assert cfg .tokenizer .tokenizer_model != base_cfg .tokenizer .tokenizer_model
189235
190236
191- def test_gb200_mxfp8_enables_cutedsl_fusion () -> None :
192- """The non-FSDP Lightning recipe enables CutDSL without MoE A2A overlap."""
193- cfg = nemotron_3_5_lightning_pretrain_8gpu_gb200_fp8mx_config ()
237+ @pytest .mark .parametrize (
238+ "recipe_factory" ,
239+ (
240+ nemotron_3_5_lightning_pretrain_8gpu_gb200_fp8mx_config ,
241+ nemotron_3_5_lightning_pretrain_8gpu_gb300_fp8mx_config ,
242+ ),
243+ ids = lambda recipe : recipe .__name__ ,
244+ )
245+ def test_gb_mxfp8_enables_cutedsl_fusion (recipe_factory : Callable [[], ConfigContainer ]) -> None :
246+ """The non-FSDP Lightning GB recipes enable CutDSL without MoE A2A overlap."""
247+ cfg = recipe_factory ()
194248
195249 assert cfg .env_vars ["NVTE_CUTEDSL_FUSED_GROUPED_MLP" ] == 1
196250 assert cfg .env_vars ["CUDNNFE_CLUSTER_OVERLAP_MARGIN" ] == 8
197251 assert cfg .model .use_transformer_engine_op_fuser is True
198- assert cfg .model .moe_mlp_glu_interleave_size == 32
252+ assert cfg .model .moe_mlp_glu_interleave_size is None
199253 assert cfg .model .high_priority_a2a_comm_stream is False
200254 assert cfg .model .moe_hybridep_num_sms_preprocessing == 108
201255 assert cfg .mixed_precision .fp8_dot_product_attention is True
202256 assert cfg .comm_overlap .overlap_moe_expert_parallel_comm is False
203257 assert cfg .comm_overlap .delay_wgrad_compute is False
204258
205259
206- def test_gb200_mxfp8_fsdp_skips_cutedsl_fusion () -> None :
207- """The Lightning MXFP8 FSDP variant remains outside the CutDSL tuning scope."""
208- cfg = nemotron_3_5_lightning_pretrain_8gpu_gb200_fp8mx_fsdp_config ()
260+ @pytest .mark .parametrize ("recipe_factory" , _GB_FSDP_RECIPES , ids = lambda recipe : recipe .__name__ )
261+ def test_gb_mxfp8_fsdp_skips_cutedsl_fusion (recipe_factory : Callable [[], ConfigContainer ]) -> None :
262+ """The Lightning GB MXFP8 FSDP variants remain outside the CutDSL tuning scope."""
263+ cfg = recipe_factory ()
209264
210265 assert "NVTE_CUTEDSL_FUSED_GROUPED_MLP" not in cfg .env_vars
211266 assert "CUDNNFE_CLUSTER_OVERLAP_MARGIN" not in cfg .env_vars
@@ -317,9 +372,26 @@ def test_gb200_perf_recipe_topology(recipe_factory: Callable[[], ConfigContainer
317372 assert cfg .env_vars ["USE_MNNVL" ] == 1
318373
319374
320- def test_gb200_fsdp_perf_recipe_defaults () -> None :
321- """The GB200 FSDP variant retains its measured 8-GPU performance settings."""
322- cfg = nemotron_3_5_lightning_pretrain_8gpu_gb200_fp8mx_fsdp_config ()
375+ @pytest .mark .parametrize ("recipe_factory" , _GB300_RECIPES , ids = lambda recipe : recipe .__name__ )
376+ def test_gb300_perf_recipe_topology (recipe_factory : Callable [[], ConfigContainer ]) -> None :
377+ """GB300 Nemotron 3.5 Lightning variants retain the established performance topology."""
378+ cfg = recipe_factory ()
379+
380+ assert cfg .model .expert_model_parallel_size == 8
381+ assert cfg .train .global_batch_size == 512
382+ assert cfg .train .micro_batch_size == 4
383+ assert cfg .model .recompute_granularity is None
384+ assert cfg .model .seq_length == 8192
385+ assert cfg .dataset .seq_length == 8192
386+ assert cfg .model .moe_hybridep_num_sms == 16
387+ assert cfg .env_vars ["NVLINK_DOMAIN_SIZE" ] == 72
388+ assert cfg .env_vars ["USE_MNNVL" ] == 1
389+
390+
391+ @pytest .mark .parametrize ("recipe_factory" , _GB_FSDP_RECIPES , ids = lambda recipe : recipe .__name__ )
392+ def test_gb_fsdp_perf_recipe_defaults (recipe_factory : Callable [[], ConfigContainer ]) -> None :
393+ """The GB FSDP variants retain their measured 8-GPU performance settings."""
394+ cfg = recipe_factory ()
323395
324396 assert cfg .train .global_batch_size == 384
325397 assert cfg .train .micro_batch_size == 3
0 commit comments