Repository navigation
feat(trtllm): consume native KV cache events - #12167
Conversation
|
d84ba65 to
d170613
Compare
Signed-off-by: Guan Luo <41310872+GuanLuo@users.noreply.github.com>
b267ad2 to
acc1b80
Compare
|
No actionable comments were generated in the recent review. ๐ โน๏ธ Recent review infoโ๏ธ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: ๐ Files selected for processing (4)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. WalkthroughTRT-LLM KV-event publication now uses explicit disabled, polling, or streaming modes. Streaming validates configuration, discovers rank hosts, and creates rank-specific ZMQ subscribers. Worker wiring and tests now use the new mode and configuration parameters. ChangesKV Event Publication
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ๐ก Moderate ยท up to Native streaming may map some attention-DP ranks to the wrong hosts in tensor-parallel multi-node deployments, causing KV cache events to stop reaching the router for those ranks. The host-mapping contract should be confirmed or corrected before merge. ๐ฅ Pre-merge checks | โ 3 | โ 2โ Failed checks (2 warnings)
โ Passed checks (3 passed)
Full details: Description checkExplanation The description gives detailed technical scope and validation results, but it does not include the required Related Issues section or the requested Where should the reviewer start section. It also uses Summary and Validation instead of the template's Overview and Details headings. Resolution Add the required Related Issues section and select either a linked issue with a real issue number or confirm that no related issue exists. Add a Where should the reviewer start section with the key files for review. Map the existing Summary and Validation content to the template's Overview and Details sections, or retain the content under clearly equivalent headings.
Comment |
main's ai-dynamo#12167 replaced the Publisher's publish_kv_events boolean with the KvEventPublicationMode enum (DISABLED/POLLING/STREAMING), so this branch's gate had to be re-expressed rather than merged textually. Publisher.initialize() now derives kv_events_enabled from the mode and keeps the branch's split: the worker-load and forward-pass publishers follow KV events, and the stats thread runs for either flag. The branch's own KV-event dispatch is dropped in favour of main's three-way one. llm_worker keeps the collapsed serving path but passes main's full argument set, so streaming KV events survive, and takes main's tighter consolidator gate, which is POLLING-only. Signed-off-by: Jorge Antonio <matroid@outlook.com>
Summary
kv_events_configafter applying engine overridesbase_port + rank, including Slurm node discovery for multi-node deployments--publish-kv-eventsbehavior unchanged for legacy configurations; disabled orpublisher="null"native configs create no subscriberThis proof of concept pairs with NVIDIA/TensorRT-LLM#16869.
Validation
pytest-asynciowas absentgit diff --checkpassedThe local-only router smoke script is intentionally excluded from this PR.
Summary by CodeRabbit
New Features
Bug Fixes
Tests