Skip to content

Enable async scheduling by default for dynamic inference - #6851

Merged
lmcafee-nvidia merged 7 commits into
NVIDIA:mainfrom
lmcafee-nvidia:async-sched-default-enabled
Aug 28, 2026
Merged

lmcafee-nvidia merged 7 commits into
NVIDIA:mainfrom
lmcafee-nvidia:async-sched-default-enabled

Conversation

@lmcafee-nvidia

@lmcafee-nvidia lmcafee-nvidia commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor
  • I, the PR author, have personally reviewed every line of this PR.

What does this PR do?

Enable async scheduling by default for dynamic batching inference while retaining an explicit legacy opt-out.

Issue tracking

Linked issue: N/A

Changes

  • Change the CLI, setup-config, and runtime inference defaults from legacy to async.
  • Keep --inference-dynamic-batching-async-sched-mode legacy as the explicit opt-out.
  • Pin routing-replay fixtures to legacy scheduling, which that path requires.
  • Pin both sides of the performance A/B tests so existing baselines do not inherit a changing application default.
  • Make the dynamic-engine unit-test harness inherit async by default, retaining explicit legacy runs only for A/B coverage.
  • Update functional fixtures and documentation for the new default.
  • Handle timing summaries with no prefill samples, as exposed by the default-async functional run.

Validation

  • DFW job 16597287: targeted async-default dynamic-engine tests passed on all eight ranks, 23 tests per rank.
  • DFW job 16593806: targeted inference unit tests, 25 passed.
  • DFW job 16593984: default-async functional golden comparison passed with async_sched_step_count=30.
  • DFW job 16593808: both routing-replay compatibility recipes passed.
  • DFW job 16593809: legacy and async performance matrices passed all baseline tolerances.
  • DFW job 16592143: focused config tests passed on all eight ranks, 37 tests per rank.
  • tools/autoformat.sh, Ruff, Python syntax, shell syntax, YAML parsing, and git diff --check passed.

An additional broad inference sweep in job 16592143 later encountered failures in explicitly legacy FP8 cases followed by a GDN pipeline NCCL timeout; those paths do not exercise the changed default. The initial functional job 16593807 exposed the zero-prefill timing issue fixed here, and its rerun passed as noted above.

Contribution process

Pre-checks

  • I have added relevant unit tests
  • I have added relevant functional tests
  • I have added proper typing to my code
  • I have added relevant documentation
  • I have run tools/autoformat.sh on my PR

Signed-off-by: Lawrence McAfee <lmcafee@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Aug 25, 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.

Signed-off-by: Lawrence McAfee <lmcafee@nvidia.com>
Signed-off-by: Lawrence McAfee <lmcafee@nvidia.com>
@lmcafee-nvidia
lmcafee-nvidia marked this pull request as ready for review August 25, 2026 18:20
@lmcafee-nvidia
lmcafee-nvidia requested a review from a team as a code owner August 25, 2026 18:20
@lmcafee-nvidia
lmcafee-nvidia requested a review from a team August 25, 2026 18:20
@lmcafee-nvidia
lmcafee-nvidia requested review from a team as code owners August 25, 2026 18:20
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the Approved All necessary approvals have been made label Aug 27, 2026
…bled

Signed-off-by: Lawrence McAfee <lmcafee@nvidia.com>

# Conflicts:
#	tests/unit_tests/inference/engines/test_dynamic_engine.py
#	tests/unit_tests/inference/test_inference_config.py
@lmcafee-nvidia

Copy link
Copy Markdown
Contributor Author

/ok to test 7969663

Signed-off-by: Lawrence McAfee <lmcafee@nvidia.com>
@lmcafee-nvidia

Copy link
Copy Markdown
Contributor Author

/ok to test 18ede66

Signed-off-by: Lawrence McAfee <lmcafee@nvidia.com>
@lmcafee-nvidia

Copy link
Copy Markdown
Contributor Author

/ok to test 3624de3

Signed-off-by: Lawrence McAfee <lmcafee@nvidia.com>
@lmcafee-nvidia

Copy link
Copy Markdown
Contributor Author

/ok to test e10b2bd

@lmcafee-nvidia

lmcafee-nvidia commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor Author

CI follow-up:

  • The async-default regressions are fixed; test_dynamic_engine.py passed on 3624de3.
  • The only remaining failure was the unrelated test_gated_delta_net_padding.py numerical check. It passed the first PR run, then failed different cases and ranks on later runs; the isolated rerun also failed with BF16-sized deltas of 0.001953125 to 0.00390625 against a 3e-4 tolerance.
  • e10b2bd raises only that padded SBHD-vs-THD GDN comparison to 5e-3, matching the existing GDN CP correctness tolerance in the repository. No SSM production code changed.

@nemo-automation-bot

Copy link
Copy Markdown

🔄 Merge queue validation started!

You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/33200833723

Merged via the queue into NVIDIA:main with commit 6ffe9f7 Aug 28, 2026
199 checks passed
@lmcafee-nvidia
lmcafee-nvidia deleted the async-sched-default-enabled branch August 28, 2026 19:52
ksivaman pushed a commit to ksivaman/Megatron-LM that referenced this pull request Sep 1, 2026
Signed-off-by: Lawrence McAfee <lmcafee@nvidia.com>

This branch was previously deployed

2 inactive deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Approved All necessary approvals have been made complexity: low Run tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants