Repository navigation
feat(trtllm): select conversation affinity rank owner - #12225
Merged
Merged
Conversation
1 task done
|
🎯 Code Coverage (details) 🔗 Commit SHA: 89b5458 | Docs | Datadog PR Page | Give us feedback! |
Signed-off-by: krishung5 <krish@nvidia.com>
krishung5
force-pushed
the
krish/trtllm-conversation-explicit-rank
branch
from
July 28, 2026 16:21
d9b78fd to
41b9f4e
Compare
krishung5
marked this pull request as ready for review
July 28, 2026 16:25
Contributor
WalkthroughChangesConversation affinity routing
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Comment |
Contributor
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@components/src/dynamo/trtllm/request_handlers/handler_base.py`:
- Around line 1156-1172: Add a runtime capability check around the
dynamo-specific branch in the request-handler flow, rather than relying only on
CONVERSATION_PARAMS_AVAILABLE. When conversation-affinity dp-rank sourcing is
configured as “dynamo,” require the engine capability corresponding to
persistent first-turn conversation binding from TensorRT-LLM#16815; otherwise
reject the configuration or fall back to “engine” before applying
SchedulingParams in the shown branch.
🪄 Autofix (Beta)
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: 18c0358d-1246-44ce-8db7-9314632bf212
📒 Files selected for processing (7)
components/src/dynamo/trtllm/backend_args.pycomponents/src/dynamo/trtllm/conversation_affinity.pycomponents/src/dynamo/trtllm/request_handlers/handler_base.pycomponents/src/dynamo/trtllm/tests/test_trtllm_handler_base.pycomponents/src/dynamo/trtllm/tests/test_trtllm_unit.pycomponents/src/dynamo/trtllm/tests/utils.pycomponents/src/dynamo/trtllm/workers/llm_worker.py
Signed-off-by: krishung5 <krish@nvidia.com>
Signed-off-by: krishung5 <krish@nvidia.com>
Contributor
Author
|
@coderabbitai review |
Contributor
✅ Action performedReview finished.
|
Contributor
nv-yna
approved these changes
Jul 28, 2026
krishung5
enabled auto-merge (squash)
July 29, 2026 18:34
richardhuo-nv
approved these changes
Jul 30, 2026
PeaBrane
approved these changes
Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview:
Add an opt-in path for Dynamo to own the initial attention-DP placement of a conversation while TensorRT-LLM preserves the resulting conversation affinity.
This is the Dynamo-side companion to NVIDIA/TensorRT-LLM#16815 and follows up on the design discussion in #11609.
Details:
--conversation-affinity-dp-rank-source {engine,dynamo}and the equivalentDYN_ENGINE_CONV_AFFINITY_DP_RANK_SOURCEenvironment variable.engineas the default, preserving the existing behavior where TensorRT-LLM load-balances the first turn.dynamomode, forward bothConversationParamsand Dynamo's strictattention_dp_rankwhen a stable session ID and router-selected rank are available.dynamomode requires NVIDIA/TensorRT-LLM#16815 (or an equivalent TRT-LLM change) so the explicit first-turn rank is recorded as the conversation binding and later conflicting hints do not move the conversation.Where should the reviewer start?
components/src/dynamo/trtllm/request_handlers/handler_base.pycomponents/src/dynamo/trtllm/backend_args.pycomponents/src/dynamo/trtllm/tests/test_trtllm_handler_base.pyValidation:
pre-commit run --files ...python3 -m compileall -q ...PYTHONPATH=components/src python3 -m pytest -q components/src/dynamo/trtllm/tests/test_trtllm_unit.py components/src/dynamo/trtllm/tests/test_trtllm_handler_base.py components/src/dynamo/trtllm/tests/test_conversation_affinity.py(6 passed, 3 skipped; CUDA/TRT-LLM-dependent modules are skipped on the local CPU-only host and will run in CI)git diff --checkRelated Issues
🚫 This PR is NOT linked to an issue:
Summary by CodeRabbit
New Features
Tests