[None][feat] Add KV cache manager V2 support for DSA - #16060
Conversation
8ff6b1c to
69404fe
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #58215 [ run ] triggered by Bot. Commit: |
|
PR_Github #58215 [ run ] completed with state
|
69404fe to
767b3be
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #60273 [ run ] triggered by Bot. Commit: |
|
PR_Github #60273 [ run ] completed with state
|
767b3be to
eeadb01
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #60657 [ run ] triggered by Bot. Commit: |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughThe PR adds DSA support for V1 and V2 KV cache managers. It updates indexer cache sizing and mappings, draft replay metadata handling, stable pool mapping, manager selection, model defaults, tests, and documentation. ChangesDSA cache manager contracts and V2 implementation
Indexer offsets and full-KV mappings
KV cache manager selection and compatibility
Stable pool representatives and mapping validation
Indexer mappings and draft replay restoration
Kernel documentation and supporting metadata
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant LLMConfig
participant get_sparse_attn_kv_cache_manager
participant DSACacheManagerV2
participant DSAtrtllmAttentionMetadata
participant prepare_attn_metadata_for_draft_replay
LLMConfig->>get_sparse_attn_kv_cache_manager: select KV cache manager V2
get_sparse_attn_kv_cache_manager->>DSACacheManagerV2: construct DSA V2 manager
DSACacheManagerV2->>DSAtrtllmAttentionMetadata: provide page parameters and cache buffers
prepare_attn_metadata_for_draft_replay->>DSAtrtllmAttentionMetadata: bind draft buffers and recompute mappings
DSAtrtllmAttentionMetadata-->>prepare_attn_metadata_for_draft_replay: restore target metadata after replay
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
PR_Github #60657 [ run ] completed with state
|
Signed-off-by: yizhang-nv <187001205+yizhang-nv@users.noreply.github.com> Signed-off-by: Yi Zhang <187001205+yizhang-nv@users.noreply.github.com>
Signed-off-by: Yi Zhang <187001205+yizhang-nv@users.noreply.github.com>
Signed-off-by: Eric Tsai <ertsai@nvidia.com>
Signed-off-by: Yi Zhang <187001205+yizhang-nv@users.noreply.github.com>
Signed-off-by: Yi Zhang <187001205+yizhang-nv@users.noreply.github.com>
Signed-off-by: Yi Zhang <187001205+yizhang-nv@users.noreply.github.com>
Signed-off-by: Yi Zhang <187001205+yizhang-nv@users.noreply.github.com>
Signed-off-by: Yi Zhang <187001205+yizhang-nv@users.noreply.github.com>
Signed-off-by: Yi Zhang <187001205+yizhang-nv@users.noreply.github.com>
Signed-off-by: Yi Zhang <187001205+yizhang-nv@users.noreply.github.com>
Signed-off-by: Yi Zhang <187001205+yizhang-nv@users.noreply.github.com>
8245635 to
f3146d7
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #65049 [ run ] triggered by Bot. Commit: |
|
/bot run --disable-fail-fast |
|
PR_Github #65112 [ run ] triggered by Bot. Commit: |
|
PR_Github #65049 [ run ] completed with state |
|
PR_Github #65112 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #65191 [ run ] triggered by Bot. Commit: |
|
PR_Github #65191 [ run ] completed with state |
Dev Engineer Review
Role.INDEX_KEYbuffer.QA Engineer Review
Test code changes are present.
Added or updated coverage includes:
TestGLM52.test_nvfp4.indexer_k_cache_scatter_op.No corresponding
tests/integration/test_lists/changes were reported for these tests. Test-list coverage cannot be confirmed from the available changes.Verdict: needs follow-up.
Description
Port the DSA KV cache manager V2 work from liji-nv@492422b onto the latest
main.This change:
DSACacheManagerV2selection throughuse_kv_cache_manager_v2while preserving the V1 path.Role.INDEX_KEYbuffer managed by V2.Role.ALL, runtime quota calculation, and static KV cache warm-up estimation.Test Coverage
git diff --checkpassed.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)
If PR introduces API changes, an appropriate PR label is added - either
api-compatibleorapi-breaking. Forapi-breaking, includeBREAKINGin the PR title.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.