-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[None][chore] Dead code elimination, we no longer record/fetch through WindowBlockManager:: mContextBlocksByHash #6249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughAll code and tests related to hash-based block lookup and management have been removed from the KV cache manager. This includes the deletion of hash map member variables, associated methods for adding/removing blocks by hash, and all related test cases and utilities. Additionally, a constructor argument for block reuse configuration was updated to use the actual config value instead of a hardcoded false. No other logic or control flow was changed. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Suggested reviewers
Poem
Note 🔌 MCP (Model Context Protocol) integration is now available in Early Access!Pro users can now connect to remote MCP servers under the Integrations page to get reviews and chat conversations that understand additional development context. 📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (4)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (3)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
@thorjohnsen I was introduced by @symphonylyh that you are the one to consult and add as a reviewer. Tracing through the code, this structure looks dead to me, we should stop maintaining this utility (adding |
Please sign off your commit, we won't be able to merge without. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WindowBlockManager::mCachedBlocksRoot is now who is responsible
for the bookkeeping of the KVCacheBlock, and the mNextBlocks is now
the actual hash map that fetches the block.
Has this change been merged into main already?
Yes, it is already merged into main. https://github.com/NVIDIA/TensorRT-LLM/blob/main/cpp/tensorrt_llm/batch_manager/kvCacheManager.cpp#L1037 |
Updated commit. Thank you for the reminder. |
TBH I never really understood why we need this hashmap, it was introduced in MR 7247 as a preliminary for TRTLLM-1619 as a part of disaggregated serving. @zhengd-nv could you comment please? |
This is a preliminary step of transmitting arbitrary kv cache blocks between workers and the hash id is used to identify which blocks to transfer. The feature is delayed due to pytorch integration. @Tabrizian is now working on the design and could you comment if such lookup table is still required. |
Why is code added with no real responsibility, and not along the feature to introduce it? |
@Tabrizian @thorjohnsen A gentle ping, can we merge this? |
I think it is ok to remove it for now. We can add it back once the feature is completed. |
/bot run |
PR_Github #14427 [ run ] triggered by Bot |
PR_Github #14427 [ run ] completed with state |
/bot run |
PR_Github #14437 [ run ] triggered by Bot |
PR_Github #14437 [ run ] completed with state |
/bot run |
PR_Github #14455 [ run ] triggered by Bot |
PR_Github #14455 [ run ] completed with state |
/bot run |
PR_Github #14460 [ run ] triggered by Bot |
/bot run |
PR_Github #14464 [ run ] triggered by Bot |
PR_Github #14460 [ run ] completed with state |
PR_Github #14464 [ run ] completed with state |
/bot run |
PR_Github #14481 [ run ] triggered by Bot |
PR_Github #14481 [ run ] completed with state |
/bot run --disable-fail-fast |
PR_Github #14574 [ run ] triggered by Bot |
PR_Github #14574 [ run ] completed with state |
…he blocks with hashmap WindowBlockManager::mCachedBlocksRoot is responsible for the bookkeeping of the KVCacheBlock, and the mNextBlocks is now the actual hash map that fetches the block. Signed-off-by: eopXD <[email protected]>
/bot run --disable-fail-fast |
PR_Github #14700 [ run ] triggered by Bot |
PR_Github #14700 [ run ] completed with state |
Description
WindowBlockManager::mCachedBlocksRoot
is now who is responsible for the bookkeeping of theKVCacheBlock
, and themNextBlocks
is now the actual hash map that fetches the block.The
mEnableHashKey
knob and related hashing is removed.No functional change is intended in this MR.
Summary by CodeRabbit
Test Coverage
The following existing test coverages under
kvCacheManagerTest.cpp
are removed because we are no longer using the utility.