Skip to content

[#11423][feat] AutoDeploy: Basic Disagg Support#14057

Merged
govind-ramnarayan merged 2 commits into
NVIDIA:mainfrom
nv-auto-deploy:gramnarayan/disagg
Jun 10, 2026
Merged

[#11423][feat] AutoDeploy: Basic Disagg Support#14057
govind-ramnarayan merged 2 commits into
NVIDIA:mainfrom
nv-auto-deploy:gramnarayan/disagg

Conversation

@govind-ramnarayan

@govind-ramnarayan govind-ramnarayan commented May 12, 2026

Copy link
Copy Markdown
Collaborator

fixes: #11423

Summary: Disaggregated serving support for the AutoDeploy backend. Since AutoDeploy is already integrated into the TRTLLM KvCacheManager, we just need to instantiate the KvCacheTransceiver when creating the PyExecutor for AutoDeploy. This PR implements support for disaggregation in AutoDeploy for MHA and MLA-based models.

All caches must be managed by the KvCacheManager in order for disagg to run. This is to proactively flag correctness issues where the prefill node does not register some cache with the KvCacheManager, so the gen node does not get it and crashes. Exceptions can be made by registering a cache as "Ephemeral". A good example is the hidden state cache we use for collecting target-model hidden states for Eagle / MTP. This is produced and consumed within a single forward pass, so does not need to be passed from prefill to generation workers.

Not Implemented:

Testing:

Test Coverage:
We want to make sure disagg works with AutoDeploy for all the attention types that we believe we should support with disagg - currently MHA and MLA. So we want to test correctness for at least one MHA and one MLA model.

It also interacts with some other features - for instance with overlap scheduling enabled, the generation worker must not crash on the first iteration, and for Eagle, we should tolerate dropping the Hidden State Cache in the disaggregated handoff. For chunked prefill, we shouldn't do the handoff too early.

We lift some of the feature matrix for testing from https://github.com/NVIDIA/TensorRT-LLM/blob/main/tests/integration/defs/disaggregated/test_disaggregated_single_gpu.py for testing.

Methodology / types of tests:

    1. Smoke tests with reduced number of layers and random weights. They run context and generation workers sequentially on a single GPU. These are just meant to test that the disagg pipeline works without crashing. These should be cheap to run, but cannot test disagg vs agg output without using the same weights for both modes.
    1. Sequential integration tests - run context and generation workers sequentially, usually on a single GPU, with real weights. We can check that the disagg pipeline runs and that the output matches aggregate output.
    1. Async integration tests. These use an asynchronous messaging queue to more accurately simulate a real disagg workflow instead of running workers sequentially. Inspired by PyTorch backend tests here: https://github.com/NVIDIA/TensorRT-LLM/blob/main/tests/integration/defs/disaggregated/test_disaggregated_single_gpu.py
    1. TRTLLM Serve Smoke test - sets up trtllm-serve similar to how a customer would and makes sure disagg serving provides good output here.

We try to put most tests into 1) and 2) as they are cheaper and have simpler setup, and errors are more easily traceable to AutoDeploy's engine and executor. For 2) and 3) in particular, we can use reduced-layer counts with real weights and check that aggregate output matches disagg output (even if it is nonsense) - this requires less memory. We include some full-sized model tests to make sure the pipeline is working in realistic scenarios.

@coderabbitai summary

Description

Test Coverage

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)

  • 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.

GitHub Bot Help

To see a list of available CI bot commands, please comment /bot help.

Comment thread examples/auto_deploy/model_registry/configs/disagg_ctx.yaml
Comment thread tensorrt_llm/_torch/auto_deploy/custom_ops/mla/trtllm_mla.py Outdated
Comment thread tensorrt_llm/_torch/auto_deploy/custom_ops/attention_interface.py Outdated
Comment thread tensorrt_llm/_torch/auto_deploy/custom_ops/attention_interface.py Outdated
Comment thread tensorrt_llm/_torch/auto_deploy/custom_ops/attention_interface.py Outdated
Comment thread tensorrt_llm/_torch/auto_deploy/custom_ops/attention_interface.py Outdated
Comment thread tensorrt_llm/_torch/auto_deploy/shim/ad_executor.py Outdated
Comment thread tensorrt_llm/_torch/auto_deploy/shim/ad_executor.py Outdated
Comment thread tensorrt_llm/_torch/auto_deploy/shim/ad_executor.py Outdated
Comment thread tests/unittest/auto_deploy/singlegpu/smoke/test_disagg.py Outdated
Comment thread tests/unittest/auto_deploy/singlegpu/smoke/test_disagg.py Outdated
Comment thread tests/unittest/auto_deploy/singlegpu/smoke/test_disagg.py Outdated
Comment thread tests/unittest/auto_deploy/singlegpu/smoke/test_disagg.py Outdated
Comment thread tests/unittest/auto_deploy/singlegpu/smoke/test_disagg.py Outdated
Comment thread tests/unittest/auto_deploy/singlegpu/smoke/test_disagg.py Outdated
Comment thread tests/unittest/auto_deploy/singlegpu/smoke/test_disagg.py Outdated
Comment thread tests/unittest/auto_deploy/singlegpu/smoke/test_disagg.py Outdated
Comment thread tests/integration/defs/disaggregated/test_disaggregated_single_gpu.py Outdated
Comment thread tests/unittest/auto_deploy/singlegpu/smoke/test_disagg.py Outdated
Comment thread tests/unittest/auto_deploy/singlegpu/smoke/test_disagg.py Outdated
Comment thread tests/unittest/auto_deploy/singlegpu/smoke/test_disagg.py Outdated
Comment thread tests/unittest/auto_deploy/singlegpu/smoke/test_disagg.py Outdated
Comment thread tests/unittest/auto_deploy/singlegpu/smoke/test_disagg.py Outdated
Comment thread tests/unittest/auto_deploy/singlegpu/smoke/test_disagg.py Outdated
Comment thread tests/unittest/auto_deploy/singlegpu/smoke/test_disagg.py Outdated
Comment thread tests/unittest/auto_deploy/singlegpu/smoke/test_disagg.py Outdated
Comment thread tests/unittest/auto_deploy/singlegpu/smoke/test_disagg.py Outdated
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #52889 [ run ] completed with state FAILURE. Commit: 029e77c
/LLM/main/L0_MergeRequest_PR pipeline #42139 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

@suyoggupta

Copy link
Copy Markdown
Collaborator

@juney-nvidia : can you please unblock. thanks

@govind-ramnarayan

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #52982 [ run ] triggered by Bot. Commit: 029e77c Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #52982 [ run ] completed with state FAILURE. Commit: 029e77c
/LLM/main/L0_MergeRequest_PR pipeline #42214 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

@govind-ramnarayan

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #53104 [ run ] triggered by Bot. Commit: 1aa2c14 Link to invocation

Squashed branch work for AutoDeploy disagg serving: KV cache transport
config, ad_executor/interface changes for disagg, MLA/attention custom op
updates, DeepSeek model tweaks, plus integration tests (test_ad_disagg,
trtllm_serve), unit tests, smoke tests, and test-list registrations.

Signed-off-by: Govind Ramnarayan <105831528+govind-ramnarayan@users.noreply.github.com>
KVPagedResourceHandler now requires attention_type; update the two
remaining base-handler fixtures (_non_speculative_handlers and
_NON_SPECULATIVE_HANDLERS) that still constructed it without one.

Signed-off-by: Govind Ramnarayan <105831528+govind-ramnarayan@users.noreply.github.com>
@govind-ramnarayan

Copy link
Copy Markdown
Collaborator Author

/bot kill

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #53132 [ kill ] triggered by Bot. Commit: fcad4dd Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #53104 [ run ] completed with state ABORTED. Commit: 1aa2c14

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #53132 [ kill ] completed with state SUCCESS. Commit: fcad4dd
Successfully killed previous jobs for commit fcad4dd

Link to invocation

@govind-ramnarayan

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #53136 [ run ] triggered by Bot. Commit: fcad4dd Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #53136 [ run ] completed with state SUCCESS. Commit: fcad4dd
/LLM/main/L0_MergeRequest_PR pipeline #42340 completed with status: 'SUCCESS'

CI Report

Link to invocation

@govind-ramnarayan

Copy link
Copy Markdown
Collaborator Author

/bot run --stage-list DGX_H100-4_GPUs-AutoDeploy-Post-Merge-1

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #53193 [ run ] triggered by Bot. Commit: fcad4dd Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #53193 [ run ] completed with state SUCCESS. Commit: fcad4dd
/LLM/main/L0_MergeRequest_PR pipeline #42390 (Partly Tested) completed with status: 'SUCCESS'

CI Report

Link to invocation

@govind-ramnarayan

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #53230 [ run ] triggered by Bot. Commit: fcad4dd Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #53230 [ run ] completed with state SUCCESS. Commit: fcad4dd
/LLM/main/L0_MergeRequest_PR pipeline #42425 completed with status: 'SUCCESS'

CI Report

Link to invocation

@govind-ramnarayan govind-ramnarayan merged commit 2148a3e into NVIDIA:main Jun 10, 2026
7 checks passed
Shixiaowei02 added a commit to Shixiaowei02/TensorRT-LLM that referenced this pull request Jun 11, 2026
ADEngine subclasses the abstract ModelEngine and does not run
PyTorchModelEngine.__init__, so it never set `enable_spec_decode`. After
NVIDIA#14546 added an unguarded `self.model_engine.enable_spec_decode` read in
`_prepare_disagg_gen_transmission_complete` (the disagg generation handoff
path that ADEngine traverses via NVIDIA#14057 AutoDeploy Basic Disagg Support),
AutoDeploy disaggregated runs crash with:
  AttributeError: 'ADEngine' object has no attribute 'enable_spec_decode'

NVIDIA#14546 and NVIDIA#14057 each passed CI independently but conflict semantically
once both are on main. Set `is_spec_decode`/`enable_spec_decode` in
ADEngine.__init__, mirroring PyTorchModelEngine
(enable_spec_decode == spec_config is not None), so ADEngine satisfies the
ModelEngine attribute contract that shared PyExecutor code relies on.

Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com>
Shixiaowei02 added a commit to Shixiaowei02/TensorRT-LLM that referenced this pull request Jun 11, 2026
ADEngine subclasses the abstract ModelEngine and does not run
PyTorchModelEngine.__init__, so it never set `enable_spec_decode`. After
NVIDIA#14546 added an unguarded `self.model_engine.enable_spec_decode` read in
`_prepare_disagg_gen_transmission_complete` (the disagg generation handoff
path that ADEngine traverses via NVIDIA#14057 AutoDeploy Basic Disagg Support),
AutoDeploy disaggregated runs crash with:
  AttributeError: 'ADEngine' object has no attribute 'enable_spec_decode'

NVIDIA#14546 and NVIDIA#14057 each passed CI independently but conflict semantically
once both are on main. Set `is_spec_decode`/`enable_spec_decode` in
ADEngine.__init__, mirroring PyTorchModelEngine
(enable_spec_decode == spec_config is not None), so ADEngine satisfies the
ModelEngine attribute contract that shared PyExecutor code relies on.

Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com>
@Shixiaowei02

Copy link
Copy Markdown
Collaborator

I submitted a pr #15260 for the conflict fix of #14057 and #14546 .

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[AutoDeploy]: Add support for disaggregated serving