-
Notifications
You must be signed in to change notification settings - Fork 1.7k
refactor: remove batch_manager::KvCacheConfig and use executor::KvCacheConfig instead #5384
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
/bot run |
PR_Github #9552 [ run ] triggered by Bot |
PR_Github #9552 [ run ] completed with state |
/bot run --disable-fail-fast |
PR_Github #9555 [ run ] triggered by Bot |
PR_Github #9555 [ run ] completed with state |
008f26c
to
ee80aed
Compare
/bot run --disable-fail-fast |
PR_Github #9570 [ run ] triggered by Bot |
PR_Github #9570 [ run ] completed with state |
/bot run |
PR_Github #9583 [ run ] triggered by Bot |
PR_Github #9583 [ run ] completed with state |
/bot run |
PR_Github #9588 [ run ] triggered by Bot |
PR_Github #9588 [ run ] completed with state |
ee80aed
to
0c60560
Compare
/bot run --disable-fail-fast |
PR_Github #9679 [ run ] triggered by Bot |
PR_Github #9679 [ run ] completed with state |
/bot run |
PR_Github #9731 [ run ] triggered by Bot |
PR_Github #9731 [ run ] completed with state |
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.
Pull Request Overview
This PR centralizes the KvCacheConfig
type by removing the old batch_manager::KvCacheConfig
and using executor::KvCacheConfig
, while also adding a new use_uvm
option and updating serialization, Python bindings, and tests.
- Swapped includes and
using
aliases to useexecutor::KvCacheConfig
throughout C++ code. - Introduced a new
use_uvm
flag in both Python and C++ APIs, with updated pickle and serialization logic. - Removed the legacy
kvCacheConfig.h
and its Python binding tests, updating unit tests to cover the new fields.
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
triton_backend/inflight_batcher_llm/src/model_instance_state.h | Updated include path to use executor.h |
tests/unittest/bindings/test_bindings_ut.py | Removed legacy KvCacheConfig pickle test |
tensorrt_llm/llmapi/llm_args.py | Added use_uvm field to LLM API args model |
tensorrt_llm/_torch/pyexecutor/resource_manager.py | Pointed KvCacheConfigCpp import to bindings.executor |
cpp/tests/unit_tests/executor/serializeUtilsTest.cpp | Extended serialize test to cover partial reuse and use_uvm |
cpp/tensorrt_llm/pybind/executor/executorConfig.cpp | Updated pickle getstate/setstate and constructor binding |
cpp/tensorrt_llm/pybind/bindings.cpp | Removed old batch_manager::KvCacheConfig binding block |
cpp/tensorrt_llm/executor/serialization.cpp | Added serialization/deserialization of enablePartialReuse , copyOnPartialReuse , useUvm |
cpp/tensorrt_llm/executor/kvCacheConfig.cpp | Expanded constructor and methods to include useUvm |
cpp/tensorrt_llm/batch_manager/trtGptModelInflightBatching.h/cpp | Switched to executor::KvCacheConfig and updated getters |
cpp/tensorrt_llm/batch_manager/transformerBuffers.cpp | Qualified CacheType references after alias removal |
cpp/tensorrt_llm/batch_manager/kvCacheManager.cpp | Updated to use executor::KvCacheConfig getters including useUvm |
cpp/include/tensorrt_llm/executor/executor.h | Extended KvCacheConfig class signature with useUvm |
cpp/include/tensorrt_llm/batch_manager/transformerBuffers.h | Removed obsolete kvCacheConfig.h include |
cpp/include/tensorrt_llm/batch_manager/kvCacheType.h | Added new CacheType enum header |
cpp/include/tensorrt_llm/batch_manager/kvCacheManager.h | Updated function signatures to accept executor::KvCacheConfig |
cpp/include/tensorrt_llm/batch_manager/kvCacheConfig.h | Deleted legacy config header |
Comments suppressed due to low confidence (1)
tests/unittest/bindings/test_bindings_ut.py:405
- The previous test for KvCacheConfig pickling was removed, but no new test covers the updated executor.KvCacheConfig including the new use_uvm field. Consider adding a unit test to verify that pickle round-trip preserves all fields (enable_block_reuse, partial reuse flags, and use_uvm).
def test_Mpicomm():
/bot run |
PR_Github #9854 [ run ] triggered by Bot |
PR_Github #9854 [ run ] completed with state |
/bot run |
PR_Github #9893 [ run ] triggered by Bot |
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.
lgtm
…rged Signed-off-by: qixiang-99 <[email protected]>
PR_Github #9893 [ run ] completed with state |
/bot run |
PR_Github #9978 [ run ] triggered by Bot |
PR_Github #9978 [ run ] completed with state |
/bot run --disable-fail-fast |
PR_Github #10019 [ run ] triggered by Bot |
PR_Github #10019 [ run ] completed with state |
…rged Signed-off-by: qixiang-99 <[email protected]>
Signed-off-by: qixiang-99 <[email protected]>
…heConfig instead (NVIDIA#5384) Signed-off-by: Robin Kobus <[email protected]>
…heConfig instead (NVIDIA#5384) Signed-off-by: Robin Kobus <[email protected]>
…heConfig instead (NVIDIA#5384) Signed-off-by: Robin Kobus <[email protected]>
…heConfig instead (NVIDIA#5384) Signed-off-by: Robin Kobus <[email protected]>
…heConfig instead (NVIDIA#5384) Signed-off-by: Robin Kobus <[email protected]>
…heConfig instead (NVIDIA#5384) Signed-off-by: Robin Kobus <[email protected]>
…heConfig instead (NVIDIA#5384) Signed-off-by: Robin Kobus <[email protected]>
…heConfig instead (NVIDIA#5384) Signed-off-by: Robin Kobus <[email protected]>
Description
Please see commit messages for details.
Test Coverage
GitHub Bot Help
/bot [-h] ['run', 'kill', 'skip', 'reuse-pipeline'] ...
Provide a user friendly way for developers to interact with a Jenkins server.
Run
/bot [-h|--help]
to print this help message.See details below for each supported subcommand.
run [--disable-fail-fast --skip-test --stage-list "A10-1, xxx" --gpu-type "A30, H100_PCIe" --add-multi-gpu-test --only-multi-gpu-test --disable-multi-gpu-test --post-merge --extra-stage "H100_PCIe-[Post-Merge]-1, xxx"]
Launch build/test pipelines. All previously running jobs will be killed.
--disable-fail-fast
(OPTIONAL) : Disable fail fast on build/tests/infra failures.--skip-test
(OPTIONAL) : Skip all test stages, but still run build stages, package stages and sanity check stages. Note: Does NOT update GitHub check status.--stage-list "A10-1, xxx"
(OPTIONAL) : Only run the specified test stages. Examples: "A10-1, xxx". Note: Does NOT update GitHub check status.--gpu-type "A30, H100_PCIe"
(OPTIONAL) : Only run the test stages on the specified GPU types. Examples: "A30, H100_PCIe". Note: Does NOT update GitHub check status.--only-multi-gpu-test
(OPTIONAL) : Only run the multi-GPU tests. Note: Does NOT update GitHub check status.--disable-multi-gpu-test
(OPTIONAL) : Disable the multi-GPU tests. Note: Does NOT update GitHub check status.--add-multi-gpu-test
(OPTIONAL) : Force run the multi-GPU tests. Will also run L0 pre-merge pipeline.--post-merge
(OPTIONAL) : Run the L0 post-merge pipeline instead of the ordinary L0 pre-merge pipeline.--extra-stage "H100_PCIe-[Post-Merge]-1, xxx"
(OPTIONAL) : Run the ordinary L0 pre-merge pipeline and specified test stages. Examples: --extra-stage "H100_PCIe-[Post-Merge]-1, xxx".For guidance on mapping tests to stage names, see
docs/source/reference/ci-overview.md
.kill
kill
Kill all running builds associated with pull request.
skip
skip --comment COMMENT
Skip testing for latest commit on pull request.
--comment "Reason for skipping build/test"
is required. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.reuse-pipeline
reuse-pipeline
Reuse a previous pipeline to validate current commit. This action will also kill all currently running builds associated with the pull request. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.