Skip to content

[None][test] Replace disaggregated DWDP accuracy tests with aggregated coverage - #17546

Merged
Kefeng-Duan merged 3 commits into
NVIDIA:mainfrom
tianyuz-nv:feat/dwdp-agg-accuracy
Aug 20, 2026
Merged

[None][test] Replace disaggregated DWDP accuracy tests with aggregated coverage#17546
Kefeng-Duan merged 3 commits into
NVIDIA:mainfrom
tianyuz-nv:feat/dwdp-agg-accuracy

Conversation

@tianyuz-nv

@tianyuz-nv tianyuz-nv commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

DWDP accuracy is currently guarded only through disaggregated serving. That couples
the feature's CI signal to a much larger system: when disaggregated serving breaks
for reasons unrelated to DWDP — cluster transport configuration, KV cache
transceiver issues, and so on — the DWDP accuracy tests break with it. The result is
that all three disaggregated DWDP accuracy tests are currently waived on GB200 and
B200, so DWDP has no effective end-to-end accuracy coverage at all.

This PR decouples the two. DWDP accuracy is guarded by aggregated serving instead,
which exercises the same expert-sharing paths without depending on disaggregation.

What changed

  • Add tests/integration/defs/accuracy/test_dwdp_aggregated.py (3 cases, GSM8K on
    DeepSeek-V3-Lite, dwdp_size=4) and register it in the CI lists.
  • Relax the DWDP gate in create_py_executor so a single aggregated instance with
    attention DP is accepted. Aggregated attention DP satisfies the invariant DWDP
    relies on — every rank is a complete model replica owning one expert slice —
    because Mapping.dp_size == tp_size there and attention is replicated rather than
    tensor-sharded. Real tensor parallelism is still rejected, now with an explicit
    error instead of a bare assert. The change sits entirely inside the existing
    if llm_args.dwdp_config is not None: branch, so non-DWDP paths are untouched.
  • Remove the disaggregated DWDP tests from the CI lists and drop their now-dead
    waives. The file itself is kept in tree as a manual reproduction of the
    disaggregated path.
  • Fix ConfigurableMoE.calculate_num_chunks for DWDP. DWDP prefetches expert weights
    instead of dispatching tokens, so it has no comm strategy and falls into the non-DP
    branch, which asserts a single-element all_rank_num_tokens. Disaggregated context
    workers slip past that assert only because they run tp_size=1; aggregated
    attention DP passes one entry per DP rank, so the assert fires and the executor
    worker dies during attention warmup. Chunks are now sized from
    max(all_rank_num_tokens) when DWDP is on: without a dispatch a rank only
    processes its own tokens, never more. The branch is keyed off enable_dwdp rather
    than comm is None, so no non-DWDP configuration changes the branch it takes.

The disaggregated failures themselves are not fixed here; the related tracking bugs
(nvbugs 6276923 and 6525009) are being updated separately.

Test coverage

DeepSeek-V3-Lite has 72 routed experts and rank r stores
[r * num_prefetch_experts, r * num_prefetch_experts + num_experts_per_worker).

case experts per worker prefetch stride resulting layout
mode_a_uniform 18 18 4 x 18 = 72, no overlap
mode_b_overlap 24 16 each rank stores 8 redundant experts, adjacent ranges overlap
mode_a_uniform_contention_opt 18 18 as above, plus the batched prefetch path

dwdp_size=4 rather than the 2 the disaggregated tests used: aggregated serving has
no generation server, so the whole 4-GPU allocation goes to DWDP peers. Three remote
peers per rank is also what makes contention_opt meaningful, since it interleaves
prefetch slices across peers. Case count is unchanged (3 → 3).

Verification

Ran on GB200 (4 GPU) before opening this PR:

  • New aggregated tests: 3 passed, accuracy 64.556 / 63.268 / 63.457 against a
    63.710 reference.
  • Existing disaggregated DWDP accuracy test still passes with the relaxed gate
    (65.011 vs 64.740 reference), so disaggregated serving is unaffected.

That run predates the calculate_num_chunks fix, which is why it did not catch the
assert: the workspace it used still had the pre-#15397 chunking code, where the
comm is None branch summed all_rank_num_tokens instead of rejecting a
multi-element list. The fix is exercised by the same three tests in pre-merge CI.

Test Coverage

  • accuracy/test_dwdp_aggregated.py::TestDwdpAggDeepSeekV3Lite::test_dwdp_agg_accuracy[mode_a_uniform]
  • accuracy/test_dwdp_aggregated.py::TestDwdpAggDeepSeekV3Lite::test_dwdp_agg_accuracy[mode_b_overlap]
  • accuracy/test_dwdp_aggregated.py::TestDwdpAggDeepSeekV3Lite::test_dwdp_agg_accuracy[mode_a_uniform_contention_opt]

PR Checklist

Please review the following before submitting your PR:

  • PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.

  • PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.

  • Test cases are provided for new code paths (see test instructions)

  • If PR introduces API changes, an appropriate PR label is added - either api-compatible or api-breaking. For api-breaking, include BREAKING in the PR title.

  • Any new dependencies have been scanned for license and vulnerabilities

  • CODEOWNERS updated if ownership changes

  • Documentation updated as needed

  • Update tava architecture diagram if there is a significant design change in PR.

  • The reviewers assigned automatically/manually are appropriate for the PR.

  • Please check this after reviewing the above items as appropriate for this PR.

Dev Engineer Review

  • Added aggregated DWDP accuracy coverage for DeepSeek-V3-Lite with dwdp_size=4.
  • Covered uniform, overlapping, and contention_opt expert layouts.
  • Updated create_py_executor validation for supported DWDP combinations.
  • Rejected unsupported pipeline and context parallelism configurations.
  • Preserved valid disaggregated TP=1 and aggregated attention-DP configurations.
  • Fixed MoE chunk sizing for DP without dispatch by using the maximum token count across DP ranks.
  • Updated CI and QA lists without removing manual disaggregated coverage.
  • Configuration and test-list changes are consistent with the stated scope.
  • Reported GB200 verification passed all three aggregated tests and one existing disaggregated test.
  • Follow-up is required for the reported failing helper and L0_MergeRequest_PR pipelines.

QA Engineer Review

  • Added TestDwdpAggDeepSeekV3Lite.test_dwdp_agg_accuracy.
  • Covered uniform, overlapping, and contention-optimized modes.
  • Added the three aggregated tests to tests/integration/test_lists/test-db/l0_gb200_multi_gpus.yml.
  • Added the three aggregated tests to tests/integration/test_lists/qa/llm_function_core.txt.
  • Retained disaggregated tests for manual or waived coverage.
  • Each added test has CI and QA test-list coverage.
  • Verdict: sufficient.

@tianyuz-nv

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 2e96f480-9943-43ca-ad7f-085f91cd644b

📥 Commits

Reviewing files that changed from the base of the PR and between afee78d and c4e5e1a.

📒 Files selected for processing (6)
  • tensorrt_llm/_torch/modules/fused_moe/configurable_moe.py
  • tensorrt_llm/_torch/pyexecutor/py_executor_creator.py
  • tests/integration/defs/accuracy/test_dwdp_aggregated.py
  • tests/integration/defs/accuracy/test_dwdp_disaggregated_serving.py
  • tests/integration/test_lists/qa/llm_function_core.txt
  • tests/integration/test_lists/test-db/l0_gb200_multi_gpus.yml
🚧 Files skipped from review as they are similar to previous changes (6)
  • tests/integration/test_lists/test-db/l0_gb200_multi_gpus.yml
  • tensorrt_llm/_torch/pyexecutor/py_executor_creator.py
  • tensorrt_llm/_torch/modules/fused_moe/configurable_moe.py
  • tests/integration/defs/accuracy/test_dwdp_disaggregated_serving.py
  • tests/integration/defs/accuracy/test_dwdp_aggregated.py
  • tests/integration/test_lists/qa/llm_function_core.txt

Included review availability: Your plan includes up to 12 reviews per rolling hour; 11 remain after this review.


Walkthrough

DWDP initialization now validates supported aggregated attention-DP layouts. MoE chunk sizing supports non-communicating DWDP execution. DeepSeek-V3-Lite aggregated accuracy tests cover three expert layouts and are registered for QA and GB200 runs.

Changes

DWDP aggregated serving

Layer / File(s) Summary
DWDP validation and MoE chunk sizing
tensorrt_llm/_torch/pyexecutor/py_executor_creator.py, tensorrt_llm/_torch/modules/fused_moe/configurable_moe.py
DWDP rejects invalid worker counts, pipeline or context parallelism, and incomplete tensor-parallel replicas. MoE chunk sizing uses the maximum per-rank token count for communication-free DWDP execution.
Aggregated accuracy coverage and registration
tests/integration/defs/accuracy/test_dwdp_aggregated.py, tests/integration/test_lists/qa/llm_function_core.txt, tests/integration/test_lists/test-db/l0_gb200_multi_gpus.yml, tests/integration/defs/accuracy/test_dwdp_disaggregated_serving.py
A four-worker DeepSeek-V3-Lite test covers uniform, overlapping, and contention-optimized layouts with GSM8K evaluation. QA and GB200 lists register the aggregated tests. Disaggregated tests document manual execution and UCX checks.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to c4e5e

The PR replaces disaggregated DWDP accuracy coverage with aggregated coverage and updates the related execution and chunking paths; no actionable merge-blocking risk remains based on the supplied evidence.

Possibly related PRs

Suggested reviewers: chienchunhung, schetlur-nv, cascade812, asfiyab-nvidia

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes replacing disaggregated DWDP accuracy tests with aggregated coverage.
Description check ✅ Passed The description explains the motivation, implementation, test coverage, verification results, and checklist items in sufficient detail.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tensorrt_llm/_torch/pyexecutor/py_executor_creator.py`:
- Around line 562-567: Extend the validation condition guarding the DWDP
complete-replica invariant to also reject mapping.pp_size > 1, while preserving
the existing tp_size and enable_attention_dp checks and error path. Update the
ValueError message to clearly identify the invalid pipeline-parallel
configuration and retain the valid configuration guidance.

In `@tests/integration/defs/accuracy/test_dwdp_aggregated.py`:
- Line 66: Update the test_dwdp_agg_accuracy method signature by annotating
num_experts_per_worker and num_prefetch_experts as int, contention_opt as bool,
and the return type as None.

In `@tests/integration/defs/accuracy/test_dwdp_disaggregated_serving.py`:
- Around line 13-18: Correct the manual-run guidance to reflect that
disaggregated workers use the value returned by get_ucx_tls(), assigned through
run_env["UCX_TLS"] in the test setup. Either document that effective policy and
its configuration source, or add and validate an override parameter that
controls the context and generation workers before describing manual UCX_TLS
overrides.
- Around line 6-11: Update the manual execution documentation in the test file’s
introductory NOTE to state that running it directly with pytest requires GPU
access, model weights, and LLM_MODELS_ROOT set to a valid model root (or an
available fallback directory), and include these prerequisites in the documented
command.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: d6be1cd9-f2a6-4fcb-abe7-2653319ac949

📥 Commits

Reviewing files that changed from the base of the PR and between 07b3e82 and 42c5352.

📒 Files selected for processing (6)
  • tensorrt_llm/_torch/pyexecutor/py_executor_creator.py
  • tests/integration/defs/accuracy/test_dwdp_aggregated.py
  • tests/integration/defs/accuracy/test_dwdp_disaggregated_serving.py
  • tests/integration/test_lists/qa/llm_function_core.txt
  • tests/integration/test_lists/test-db/l0_gb200_multi_gpus.yml
  • tests/integration/test_lists/waives.txt
💤 Files with no reviewable changes (1)
  • tests/integration/test_lists/waives.txt

Comment thread tensorrt_llm/_torch/pyexecutor/py_executor_creator.py Outdated
Comment thread tests/integration/defs/accuracy/test_dwdp_aggregated.py Outdated
Comment thread tests/integration/defs/accuracy/test_dwdp_disaggregated_serving.py Outdated
Comment thread tests/integration/defs/accuracy/test_dwdp_disaggregated_serving.py
@tianyuz-nv

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65553 [ run ] triggered by Bot. Commit: 42c5352 Link to invocation

@tianyuz-nv
tianyuz-nv force-pushed the feat/dwdp-agg-accuracy branch from 3e97ba9 to 6f89bf9 Compare August 14, 2026 03:34
@tianyuz-nv

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #66425 [ run ] triggered by Bot. Commit: 6f89bf9 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #66425 [ run ] completed with state FAILURE. Commit: 6f89bf9
/LLM/main/L0_MergeRequest_PR pipeline #54067 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@tianyuz-nv
tianyuz-nv force-pushed the feat/dwdp-agg-accuracy branch from 6f89bf9 to c4e5e1a Compare August 17, 2026 05:57
@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@tianyuz-nv

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #66669 [ run ] triggered by Bot. Commit: c4e5e1a Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #66669 [ run ] completed with state FAILURE. Commit: c4e5e1a
/LLM/main/L0_MergeRequest_PR pipeline #54286 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

…d coverage

DWDP accuracy was gated by three disaggregated-serving tests that are
currently waived on GB200 and B200, so the feature has no effective CI
coverage. Those tests exercise DWDP through the disaggregated KV cache
transceiver, which makes them sensitive to per-cluster UCX transport
configuration rather than to DWDP itself.

Add an aggregated equivalent instead. A single instance running attention
DP satisfies the invariant DWDP relies on -- every rank is a complete model
replica owning one expert slice -- because Mapping.dp_size == tp_size there
and attention is replicated rather than tensor-sharded. Relax the DWDP gate
in create_py_executor accordingly: tp_size > 1 is now accepted when
attention DP is enabled, and real tensor parallelism is still rejected with
an explicit error. Mapping already forces moe_tp = moe_ep = 1 whenever
dwdp_size > 1, so expert weights stay unsharded and ConfigurableMoE selects
no MoE communication strategy on this path.

The new tests run at dwdp_size=4 rather than the 2 the disaggregated tests
used: aggregated serving has no generation server, so the whole allocation
goes to DWDP peers. Three remote peers per rank also make contention_opt
meaningful, since it interleaves prefetch slices across peers -- with a
single remote peer that path was degenerate.

Retire the disaggregated tests from the CI lists and drop their now-dead
waives, but keep the file in tree as a manual reproduction of the
disaggregated DWDP path, with a note on the UCX_TLS setting to check first.

Signed-off-by: tianyuz-nv <tianyuz@nvidia.com>
Reject pipeline and context parallelism for DWDP. The previous
tp_size == 1 assert never covered them, yet a pipeline or context
parallel rank is a shard of a replica rather than a replica, and
dwdp_rank = global_mpi_rank() % dwdp_size would pair ranks holding
different layers as DWDP peers -- wrong expert weights instead of a
startup error.

Test the tensor-parallel invariant directly as dp_size == tp_size
instead of using enable_attention_dp as a proxy for it. The two are
equivalent while Mapping.dp_size derives from that flag, but a future
partial attention DP would let the flag admit a tensor-sharded rank.

Assert in the aggregated test that the LLM still carries dwdp_config.
create_py_executor either honours the config or raises, so this
distinguishes a DWDP run from one where the config was dropped and MoE
silently fell back to the normal parallel path -- which is also correct
and would score the same.

Keep the disaggregated tests in the QA list under their existing waive
rather than dropping them entirely. The file imports helpers from
test_disaggregated_serving.py and would rot unnoticed if nothing
collected it, and keeping the waive makes dropping it the natural signal
that the disaggregated path is healthy again. Only the pre-merge list
entry is removed, so pre-merge no longer depends on disaggregated
serving.

Also note the world-size relationship the test relies on, and annotate
the test parameters.

Signed-off-by: tianyuz-nv <tianyuz@nvidia.com>
`ConfigurableMoE.calculate_num_chunks` only recognised two shapes: DP with a
comm strategy (rows = num_dp_ranks * max_tokens_per_rank after dispatch) and
non-DP, which asserts the caller passed a single-element `all_rank_num_tokens`.

DWDP is a third shape. It prefetches expert weights to every rank instead of
dispatching tokens to experts, so `_create_comm_strategy_auto` returns None and
the non-DP branch is taken. Disaggregated context workers pass its assert only
because they run tp_size=1, so the list has one entry anyway. Aggregated serving
with attention DP passes one entry per DP rank, the assert fires, and the
executor worker dies during attention warmup:

    non-DP path expects a single-element list, got 4

Size the chunks from `max(all_rank_num_tokens)` when DWDP is on: without a
dispatch a rank only ever processes its own tokens, never more.

The branch is keyed off `enable_dwdp` rather than `comm is None` so that no
non-DWDP configuration changes the branch it takes. `enable_dwdp` is assigned
once in `__init__`, before both the comm strategy and the scheduler are built,
and implies `comm is None`, so the new branch is always reached when DWDP is on
and never reachable otherwise. Single-element lists are unaffected either way,
since `max([n]) == n`.

Signed-off-by: tianyuz-nv <tianyuz@nvidia.com>
@tianyuz-nv
tianyuz-nv force-pushed the feat/dwdp-agg-accuracy branch from c4e5e1a to e8cfdcd Compare August 18, 2026 02:09
@tianyuz-nv

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #66928 [ run ] triggered by Bot. Commit: e8cfdcd Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #66928 [ run ] completed with state FAILURE. Commit: e8cfdcd
/LLM/main/L0_MergeRequest_PR pipeline #54479 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@tianyuz-nv

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #67033 [ run ] triggered by Bot. Commit: e8cfdcd Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #67033 [ run ] completed with state FAILURE. Commit: e8cfdcd
/LLM/main/L0_MergeRequest_PR pipeline #54575 completed with status: 'UNSTABLE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

Link to invocation

@tianyuz-nv

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #67247 [ run ] triggered by Bot. Commit: e8cfdcd Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #67247 [ run ] completed with state SUCCESS. Commit: e8cfdcd
/LLM/main/L0_MergeRequest_PR pipeline #54773 completed with status: 'SUCCESS'

CI Report

Link to invocation

@YihuiLu512 YihuiLu512 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tianyuz-nv

Copy link
Copy Markdown
Collaborator Author

Hi @brnguyen2 thanks for your feedback. I’ve addressed your comments. Could you please take another look and approve the PR if everything looks good?

@QiJune QiJune left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Kefeng-Duan
Kefeng-Duan merged commit 9f5f711 into NVIDIA:main Aug 20, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.