Skip to content

Commit 3a2b11d

Browse files
authored
no non det algo (#6282)
Signed-off-by: Malay Nagda <malayn@nvidia.com>
1 parent ec4ec35 commit 3a2b11d

4 files changed

Lines changed: 5 additions & 16 deletions

File tree

‎src/megatron/bridge/perf_recipes/deepseek/vr200/deepseek_v3.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ def deepseek_v3_pretrain_256gpu_vr200_fp8mx_config() -> ConfigContainer:
328328
"NVTE_NORM_BWD_USE_CUDNN": 1,
329329
"NVTE_NORM_FWD_USE_CUDNN": 1,
330330
# Keep DeepSeek kernel selection aligned with the measured baseline.
331-
"NVTE_ALLOW_NONDETERMINISTIC_ALGO": 1,
331+
"NVTE_ALLOW_NONDETERMINISTIC_ALGO": 0,
332332
}
333333
return cfg
334334

@@ -369,7 +369,7 @@ def deepseek_v3_pretrain_64gpu_vr200_fp8mx_proxy_config() -> ConfigContainer:
369369
"NVTE_FWD_LAYERNORM_SM_MARGIN": 20,
370370
"NVTE_NORM_BWD_USE_CUDNN": 1,
371371
"NVTE_NORM_FWD_USE_CUDNN": 1,
372-
"NVTE_ALLOW_NONDETERMINISTIC_ALGO": 1,
372+
"NVTE_ALLOW_NONDETERMINISTIC_ALGO": 0,
373373
}
374374
return cfg
375375

‎src/megatron/bridge/perf_recipes/deepseek/vr200/deepseek_v4.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ def deepseek_v4_flash_pretrain_128gpu_vr200_fp8mx_config() -> ConfigContainer:
4747
"NVTE_FWD_LAYERNORM_SM_MARGIN": 20,
4848
"NVTE_NORM_BWD_USE_CUDNN": 1,
4949
"NVTE_NORM_FWD_USE_CUDNN": 1,
50-
# This benchmark-only recipe permits Scaled-SwiGLU dprob atomics in the fused path.
51-
"NVTE_ALLOW_NONDETERMINISTIC_ALGO": 1,
50+
"NVTE_ALLOW_NONDETERMINISTIC_ALGO": 0,
5251
}
5352
return cfg

‎tests/unit_tests/recipes/test_deepseek_v4_flash_perf_recipes.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,12 @@ def test_deepseek_v4_flash_128gpu_vr200_fp8mx_disables_clamp_for_cutedsl() -> No
144144
assert vr200_cfg.model.use_transformer_engine_op_fuser is True
145145
assert vr200_cfg.model.moe_use_grouped_tensor is True
146146
assert vr200_cfg.env_vars["NVTE_CUTEDSL_FUSED_GROUPED_MLP"] == 1
147-
assert vr200_cfg.env_vars["NVTE_ALLOW_NONDETERMINISTIC_ALGO"] == 1
147+
assert vr200_cfg.env_vars["NVTE_ALLOW_NONDETERMINISTIC_ALGO"] == 0
148148
assert is_full_iteration_cuda_graph(vr200_cfg.model)
149149

150150
gb300_cfg.model.activation_func_clamp_value = None
151151
gb300_cfg.model.use_transformer_engine_op_fuser = True
152152
gb300_cfg.model.moe_use_grouped_tensor = True
153-
gb300_cfg.env_vars["NVTE_ALLOW_NONDETERMINISTIC_ALGO"] = 1
154153
assert vars(vr200_cfg.model) == vars(gb300_cfg.model)
155154
for field in fields(vr200_cfg):
156155
if field.name != "model":

‎tests/unit_tests/recipes/test_perf_recipe_environment.py‎

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -223,16 +223,7 @@ def test_explicit_environment_invariants_across_all_flat_recipes():
223223
# so these recipes must not pin NVTE_ALLOW_NONDETERMINISTIC_ALGO=0.
224224
assert "NVTE_ALLOW_NONDETERMINISTIC_ALGO" not in environment
225225
else:
226-
# These VR200 MXFP8 recipes explicitly opt into this path.
227-
expected_nondeterminism = int(
228-
function_name
229-
in {
230-
"deepseek_v3_pretrain_256gpu_vr200_fp8mx_config",
231-
"deepseek_v3_pretrain_64gpu_vr200_fp8mx_proxy_config",
232-
"deepseek_v4_flash_pretrain_128gpu_vr200_fp8mx_config",
233-
}
234-
)
235-
assert environment["NVTE_ALLOW_NONDETERMINISTIC_ALGO"] == expected_nondeterminism
226+
assert environment["NVTE_ALLOW_NONDETERMINISTIC_ALGO"] == 0
236227
if "NCCL_EP_HT_EM_PULL_PUSH" in environment:
237228
# NCCL EP recipes drop the HybridEP tuning that nothing reads on that backend.
238229
assert not hybrid_ep_names

0 commit comments

Comments
 (0)