Skip to content

Update DeepSeek-V3 B300 recipe - #5015

Merged
malay-nagda merged 1 commit into
mainfrom
scsudhakaran/dsv3-b300
Jul 23, 2026
Merged

Update DeepSeek-V3 B300 recipe#5015
malay-nagda merged 1 commit into
mainfrom
scsudhakaran/dsv3-b300

Conversation

@scsudhakaran

Copy link
Copy Markdown
Contributor

This PR updates B300 perf configs to align with #4458

@copy-pr-bot

copy-pr-bot Bot commented Jul 22, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@scsudhakaran
scsudhakaran requested a review from yaoyu-33 July 22, 2026 12:17
@claude

claude Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review

Light review of the DeepSeek V3 B300 perf-recipe retuning. Two issues, one CI-blocking.

Critical - breaks perf-recipe env unit tests

deepseek_v3_pretrain_256gpu_b300_fp8mx_large_scale_config was refactored to derive from the fp8mx config and no longer assigns cfg.env_vars inline. tests/unit_tests/recipes/test_perf_recipe_environment.py requires every canonical flat recipe builder to declare its env via an inline cfg.env_vars assignment:

  • test_every_flat_recipe_builder_declares_its_environment_inline (via _explicit_environment, asserts exactly one inline cfg.env_vars assignment)
  • test_explicit_environment_invariants_across_all_flat_recipes

The builder name matches the canonical regex, so both tests will fail. Every other large_scale config (b200/gb200/gb300) still keeps the inline env dict for this reason. Keep an inline cfg.env_vars here.

Low - stale docstring on nvfp4 config

deepseek_v3_pretrain_256gpu_b300_nvfp4_config docstring still says (PP=16 matching base layout), but the refactor dropped the PP=16/VPP=None overrides and the layout call, so it now inherits PP=8/VPP=2 from the bf16 base. Update the docstring.

Notes (non-blocking)

  • bf16/fp8cs/fp8mx configs changed MBS 2 to 1 and VPP None to 2; nvfp4 keeps MBS=2. Layout map has a (8, 2) entry so the new VPP=2 is covered. Intentional retunings - verify against measured baselines.
  • fp8mx now adds NVTE_NORM_FWD/BWD_USE_CUDNN=1 (both present, satisfies the all-or-nothing cuDNN invariant) and switches cuda_graph_impl to full_iteration via _enable_deepseek_full_iteration_mxfp8.

Suggested test cases

  • tests/unit_tests/recipes/test_perf_recipe_environment.py::test_every_flat_recipe_builder_declares_its_environment_inline
  • tests/unit_tests/recipes/test_perf_recipe_environment.py::test_explicit_environment_invariants_across_all_flat_recipes
  • deepseek_v3_pretrain_256gpu_b300_bf16_config
  • deepseek_v3_pretrain_256gpu_b300_fp8cs_config
  • deepseek_v3_pretrain_256gpu_b300_fp8mx_config
  • deepseek_v3_pretrain_256gpu_b300_nvfp4_config
  • deepseek_v3_pretrain_256gpu_b300_fp8mx_large_scale_config

(Perf configs touched are the B300 DeepSeek V3 recipes above; exercised by test_all_perf_recipe_factories and test_perf_recipe_environment offline construction tests rather than named _perf functional cases.)

Comment thread src/megatron/bridge/perf_recipes/deepseek/b300/deepseek_v3.py
Comment thread src/megatron/bridge/perf_recipes/deepseek/b300/deepseek_v3.py Outdated
@yaoyu-33 yaoyu-33 added area:perf Performance optimizations and benchmarking feature New capabilities, enhancements, or enablement work waiting-on-customer Waiting on the original author to respond labels Jul 22, 2026
yaoyu-33
yaoyu-33 previously approved these changes Jul 22, 2026
@scsudhakaran

Copy link
Copy Markdown
Contributor Author

/ok to test f7f22a1

@scsudhakaran

Copy link
Copy Markdown
Contributor Author

/ok to test bec3e1d

Signed-off-by: Sanju C Sudhakaran <scsudhakaran@nvidia.com>
@scsudhakaran
scsudhakaran force-pushed the scsudhakaran/dsv3-b300 branch from bec3e1d to 03d9d29 Compare July 23, 2026 05:38
@scsudhakaran

Copy link
Copy Markdown
Contributor Author

/ok to test 03d9d29

@malay-nagda
malay-nagda merged commit ecfcd84 into main Jul 23, 2026
83 of 85 checks passed
@malay-nagda
malay-nagda deleted the scsudhakaran/dsv3-b300 branch July 23, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:perf Performance optimizations and benchmarking feature New capabilities, enhancements, or enablement work waiting-on-customer Waiting on the original author to respond

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants