fix(snapshot): warm vLLM and TRT-LLM before capture - #11744
Conversation
WalkthroughSnapshot lifecycle configuration now exposes a validated warmup timeout. TensorRT-LLM and vLLM snapshot preparation perform asynchronous generation warmups before snapshot readiness, with timeout, failure, abort, configuration validation, and ordering tests. ChangesSnapshot warmup configuration
TensorRT-LLM warmup
vLLM warmup
Estimated code review effort: 4 (Complex) | ~45 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Comment |
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/vllm/snapshot.py`:
- Around line 66-76: Bound warmup abort cleanup with the existing timeout in
vLLM snapshot handling, and avoid swallowing abort failures by handling the
cleanup timeout explicitly while preserving the original generation timeout.
Apply the equivalent cleanup-timeout change to the TRT-LLM snapshot path. Extend
the warmup tests to cover an abort failure, including the expected logging and
timeout behavior at the affected test range.
🪄 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: acd1967f-350a-4f48-93d2-9fc22c2968a7
📒 Files selected for processing (7)
components/src/dynamo/common/snapshot/constants.pycomponents/src/dynamo/common/snapshot/lifecycle.pycomponents/src/dynamo/common/tests/test_snapshot_lifecycle.pycomponents/src/dynamo/trtllm/snapshot.pycomponents/src/dynamo/trtllm/tests/test_trtllm_snapshot.pycomponents/src/dynamo/vllm/snapshot.pycomponents/src/dynamo/vllm/tests/test_vllm_snapshot.py
e931994 to
ed6fc53
Compare
|
/ok to test ed6fc53 |
ed6fc53 to
76baa4f
Compare
|
/ok to test 76baa4f |
Signed-off-by: Schwinn Saereesitthipitak <schwinns@nvidia.com>
76baa4f to
08790bb
Compare
mohammedabdulwahhab
left a comment
There was a problem hiding this comment.
Question: Why don't the existing warmup paths on the engine cover this? It would be useful to have a comment on why this is missed on those paths.
| def _create_warmup_sampling_params() -> Any: | ||
| from tensorrt_llm.llmapi import SamplingParams | ||
|
|
||
| return SamplingParams( |
There was a problem hiding this comment.
how were these values chosen? can the selection of these determine which kernels were compiled?
Summary
ready-for-snapshot.AsyncLLM, consuming the rank streams concurrently before capture.This follows the same basic invariant as SGLang's startup warmup: exercise the normal prefill, decode, and sampling path before declaring the engine ready for capture.
Details
tensorrt_llm.llmapisurface.Where should the reviewer start?
components/src/dynamo/vllm/snapshot.pycomponents/src/dynamo/trtllm/snapshot.pyValidation
git diff --check— passed.v1.3.0rc20publicSamplingParamsexport and the pinned vLLM direct-generation/rank-routing API contracts.No separate local runtime test stage was run for this revision. CI is responsible for the backend test environments. A real GPU checkpoint/capture/restore smoke test was not available locally.
Related Issues
🚫 This PR is NOT linked to an issue: