[https://nvbugs/6035425][fix] Fix KV cache host splitting logic#14373
Conversation
|
/bot run |
📝 WalkthroughWalkthroughThis PR refactors KV cache budget splitting for speculative decoding draft caches by introducing separate GPU and host budget-split helpers in ChangesKV Cache Budget Splitting for Speculative Decoding
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
PR_Github #49484 [ run ] triggered by Bot. Commit: |
|
PR_Github #49484 [ run ] completed with state
|
|
/bot run |
|
PR_Github #49755 [ run ] triggered by Bot. Commit: |
|
PR_Github #49755 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #49957 [ run ] triggered by Bot. Commit: |
|
PR_Github #49957 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #50360 [ run ] triggered by Bot. Commit: |
|
PR_Github #50360 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #50558 [ run ] triggered by Bot. Commit: |
|
PR_Github #50558 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #50626 [ run ] triggered by Bot. Commit: |
|
PR_Github #50626 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #50792 [ run ] triggered by Bot. Commit: |
|
PR_Github #50792 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #51070 [ run ] triggered by Bot. Commit: |
|
/bot run --disable-fail-fast |
|
PR_Github #53332 [ run ] triggered by Bot. Commit: |
|
PR_Github #53329 [ run ] completed with state |
|
PR_Github #53336 [ run ] triggered by Bot. Commit: |
|
PR_Github #53336 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #53470 [ run ] triggered by Bot. Commit: |
|
PR_Github #53470 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #53586 [ run ] triggered by Bot. Commit: |
|
/bot run --disable-fail-fast |
|
PR_Github #53610 [ run ] triggered by Bot. Commit: |
|
PR_Github #53586 [ run ] completed with state |
Signed-off-by: Mike Iovine <miovine@nvidia.com>
36542ee to
c8a8168
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #53632 [ run ] triggered by Bot. Commit: |
|
PR_Github #53610 [ run ] completed with state |
|
/bot run --disable-fail-fast |
|
PR_Github #53697 [ run ] triggered by Bot. Commit: |
|
PR_Github #53632 [ run ] completed with state |
|
PR_Github #53697 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #53795 [ run ] triggered by Bot. Commit: |
|
PR_Github #53795 [ run ] completed with state |
Description
The fix in #13130 only applied to the V2 KV cache manager.
Make it so that the KV cache host budget is always split proportionally across the draft and target. I did not mess with the GPU side splitting at all.
Note that V1 (non-VSWA) does not use the same budget splitting logic for the GPU side memory. It instead does it "implicitly" using a single
max_num_tokensvalue. I did not want to mess with it since this is a sensitive part of the system, so the behavior there is unchanged (a simpler way to fix this is to simply remove the VSWA restriction on the call to_split_kv_cache_budget_for_draft, but the changes existing behavior).Test Coverage
New tests added and manually verified that host budget is not doubled.
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.Summary by CodeRabbit