Repository navigation
[None][feat] Add image routing metadata to OpenEngine KV events - #21125
Conversation
Signed-off-by: Guan Luo <[email protected]>
Signed-off-by: Guan Luo <[email protected]>
Signed-off-by: Guan Luo <[email protected]>
Signed-off-by: Guan Luo <[email protected]>
Signed-off-by: Guan Luo <[email protected]>
Signed-off-by: Guan Luo <[email protected]>
Signed-off-by: Guan Luo <[email protected]>
Signed-off-by: krishung5 <[email protected]>
Signed-off-by: krishung5 <[email protected]>
Signed-off-by: krishung5 <[email protected]>
Signed-off-by: krishung5 <[email protected]>
Signed-off-by: krishung5 <[email protected]>
Signed-off-by: krishung5 <[email protected]>
Signed-off-by: krishung5 <[email protected]>
Signed-off-by: krishung5 <[email protected]>
Signed-off-by: krishung5 <[email protected]>
Signed-off-by: krishung5 <[email protected]>
Signed-off-by: krishung5 <[email protected]>
…ngine-image-media Signed-off-by: krishung5 <[email protected]> # Conflicts: # tensorrt_llm/grpc/openengine/capabilities.py # tensorrt_llm/grpc/openengine/request_mapping.py # tensorrt_llm/inputs/media_io.py # tests/unittest/grpc/openengine/test_multimodal.py # tests/unittest/inputs/test_url_validation.py
Signed-off-by: krishung5 <[email protected]>
Signed-off-by: krishung5 <[email protected]>
Signed-off-by: krishung5 <[email protected]>
Signed-off-by: krishung5 <[email protected]> # Conflicts: # tensorrt_llm/inputs/utils.py
Signed-off-by: krishung5 <[email protected]>
Signed-off-by: krishung5 <[email protected]>
|
/bot run |
|
This branch now uses #19529’s native UUID transport instead of a parallel Python lookup table. The OpenEngine capability and normalization metadata remain on top. #19529 itself is unchanged, and this PR depends on it merging first. Post-merge validation passed 402 focused cases and 8/8 unpinned two-worker routing repeats; all 14 responses and usage counts matched the engines. Full merged-wheel CI remains pending. |
|
PR_Github #81504 [ run ] triggered by Bot. Commit: |
|
PR_Github #81504 [ run ] completed with state |
Signed-off-by: krishung5 <[email protected]>
Head branch was pushed to by a user without write access
|
/bot run |
|
PR_Github #81589 [ run ] triggered by Bot. Commit: |
|
PR_Github #81589 [ run ] completed with state
|
|
/bot run |
1 similar comment
|
/bot run |
|
PR_Github #81709 [ run ] triggered by Bot. Commit: |
|
PR_Github #81709 [ run ] completed with state
|
Signed-off-by: krishung5 <[email protected]>
|
/bot run |
|
PR_Github #81741 [ run ] triggered by Bot. Commit: |
|
PR_Github #81741 [ run ] completed with state |
Description
Expose optional image routing identities alongside the native KV cache content digests so external routers can compute request-compatible image-prefix hashes. The engine continues to hash image content and caller UUIDs; a routing hint does not replace content-sensitive cache identity.
The image-input prerequisite #20446 is merged into main. This PR is independent of the image performance follow-up #21037 and the video/audio PRs, so review and validation can proceed in parallel. The companion Dynamo implementation is ai-dynamo/dynamo#17437, stacked on image passthrough ai-dynamo/dynamo#16613. End-to-end deployment requires those Dynamo changes and an official TRT-LLM runtime containing this routing implementation.
This PR targets main. The prerequisite image implementation is already on main; after the branch refresh is pushed, the Files changed view will show the routing follow-up and its processor-default regression fix.
trtllm_image_routingevent metadata. Text-only stores omit this extension. The publisher does not interpret client-specific UUID prefixes.ModelInfo.extra.trtllm_image_routing_version = 1only for aggregated Qwen3-VL with explicit KV cache V2, block reuse, and ZMQ events. Disaggregated routing remains disabled.Additive API change; a repository maintainer needs to add
api-compatiblebecause the author account cannot apply repository labels. No OpenEngine proto changes or new dependencies. Routing identities must refer to stable media content.Test Coverage
Local GPU evidence uses a TensorRT-LLM 1.4.0rc0 runtime with the relevant Python sources installed and explicit validation-only adapters for the new native UUID getter and release capacity discovery. This is not a matching compiled PR wheel. Validation of the new binding and the native introspection-based event suite requires the matching upstream build. Full HTTP routing between two workers and performance benchmarking remain pending. Matching-build validation and full HTTP cache-aware selection between two workers remain required before merge.
PR Checklist
Dev Engineer Review
The change adds optional image-routing UUIDs to streaming KV events. Content digests remain the cache identity. OpenEngine advertises routing version 1 only for aggregated Qwen3-VL when KV cache manager V2, block reuse, and ZMQ events are enabled. Disaggregated routing remains disabled.
The UUID mapping is bounded, ignores UUIDs over 256 UTF-8 bytes, and rejects conflicting UUIDs for the same digest. Verify that consumers handle missing or evicted hints without dropping later removals. The new read-only
GenericLlmRequest.multimodal_uuidsproperty and media-I/O defaults are additive API changes.Reported validation includes focused CPU tests, GPU conformance, and targeted pre-commit checks. The GPU test used a different TensorRT-LLM runtime and validation-only adapters. Matching-build validation and full two-worker HTTP routing remain pending. The reported CI runs failed. No current review findings were supplied, so review severity counts are unavailable.
QA Engineer Review
Tests were added or modified in the OpenEngine, KV-cache event-manager, and executor test directories. Coverage includes capability selection, UUID propagation, content-sensitive hashes, event serialization, text-only omission, mapping eviction, oversized UUIDs, conflicting hints, and real-model cache reuse.
The CPU CI list includes
test_control.py,test_image_routing.py, andtest_multimodal.py. The A10 CI list includestest_image_routing_conformance.py. The KV-cache event-manager and executor tests have no test-list entries reported here. Focused CPU tests and GPU conformance were reported as passing, but the PR CI runs failed. Matching-build validation and full two-worker HTTP routing remain pending. Coverage verdict: needs follow-up.Per-File QA Perspective
cpp/tensorrt_llm/nanobind/batch_manager/bindings.cpp— Verify thatGenericLlmRequest.multimodal_uuidsreturnsNonewhen UUID data is absent and a copy when present.tensorrt_llm/_torch/pyexecutor/kv_cache/kv_cache_manager_v2.py— Verify that streaming event managers receive each digest/UUID pair and that other manager types skip registration.tensorrt_llm/_torch/pyexecutor/kv_cache_events.py— Verify bounded UUID retention, conflict handling, oversized UUID rejection, and optional metadata emission. Check missing or evicted hints and subsequent removals.tensorrt_llm/grpc/openengine/README.md— Check that documented support limits match runtime behavior, including disaggregated routing and non-image modalities.tensorrt_llm/grpc/openengine/capabilities.py— Verify the image-routing capability conditions and exclusions.tensorrt_llm/grpc/openengine/control.py— Verify thatGetModelInfoadvertises the routing version only when the capability is supported.tensorrt_llm/inputs/registry.py— Verify that the new default media-I/O kwargs preserve behavior when processors do not define decode defaults.tests/integration/test_lists/test-db/l0_a10.yml— Adds the GPU conformance test to the A10 CI list.tests/integration/test_lists/test-db/l0_cpu.yml— Adds the CPU image-routing test; the list also contains the modified control and multimodal tests.tests/unittest/grpc/openengine/test_control.py— Covers capability conditions and exclusions. Listed intest-db/l0_cpu.yml.tests/unittest/grpc/openengine/test_image_routing.py— Covers UUID propagation, content-sensitive hashes, text-only omission, eviction, oversized UUIDs, and conflicts. Listed intest-db/l0_cpu.yml.tests/unittest/grpc/openengine/test_image_routing_conformance.py— Covers real-model routing, cache reuse, and captured KV events. Listed intest-db/l0_a10.yml.tests/unittest/grpc/openengine/test_multimodal.py— Covers image-source mapping with absent and explicit media-I/O defaults. Listed intest-db/l0_cpu.yml.tests/unittest/kv_cache_manager_v2_tests/test_kv_cache_event_manager.py— Covers routing metadata, bounded retention, digest independence, oversized hints, and conflicts. No test-list entry was reported.tests/unittest/_torch/executor/kv_cache/test_kv_cache_v2_first_new_block_probe.py— Updates the test stub’sevent_managerdefault toNone; no test-list entry was reported.tests/unittest/_torch/executor/kv_cache/test_kv_cache_v2_multimodal_runs.py— Updates the fixture’sevent_managerdefault toNone; no test-list entry was reported.tests/unittest/_torch/executor/test_pytorch_model_engine.py— Updates two MRoPE test setup calls; no test-list entry was reported.tests/unittest/_torch/test_connector_adp.py— Updates distributed test mocks and rank setup; no test-list entry was reported.