[FIX_FOR_VLLM_LATEST] adapt to upstream OffloadingSpec kv_cache_config refactor (GAUDISW-247307)#1159
Closed
tzielinski-habana wants to merge 2 commits intovllm-project:mainfrom
Closed
Conversation
…efactor (GAUDISW-247307) Signed-off-by: tzielinski-habana <tomasz.zielinski@intel.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates vllm-gaudi KV offloading integration to match upstream vLLM API changes around OffloadingSpec and KVCacheConfig.
Changes:
- Update Gaudi CPU↔HPU offloading handler creation to use new
gpu_block_sizerepresentation and compute CPU block size viablock_size_factor. - Adjust unit tests to construct and pass the required
KVCacheConfigintoOffloadingConnector.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| vllm_gaudi/v1/kv_offload/worker/cpu_hpu.py | Adapts handler initialization to upstream gpu_block_size refactor and replaces removed offloaded_block_size usage. |
| tests/unit_tests/kv_offload/test_offloading_connector.py | Updates tests to satisfy new OffloadingConnector constructor requirements by providing a KVCacheConfig. |
You can also share your feedback on Copilot code review. Take the survey.
| self.scheduler.update_from_output(scheduler_output, model_runner_output) | ||
|
|
||
| if (prev_token_id is EOS_TOKEN_ID and prev_token_id != token_id and self.scheduler.requests): | ||
| if prev_token_id is EOS_TOKEN_ID and prev_token_id != token_id and self.scheduler.requests: |
Comment on lines
369
to
+375
| if not self._handlers: | ||
| assert len(self.gpu_block_size) == 1 | ||
| gpu_block_size = self.gpu_block_size[0] | ||
| self._handlers = CpuGpuOffloadingHandlers( | ||
| attn_backends=attn_backends, | ||
| gpu_block_size=self.gpu_block_size, | ||
| cpu_block_size=self.offloaded_block_size, | ||
| gpu_block_size=gpu_block_size, | ||
| cpu_block_size=gpu_block_size * self.block_size_factor, |
Signed-off-by: tzielinski-habana <tomasz.zielinski@intel.com>
✅ CI PassedAll checks passed successfully against the following vllm commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adapts vllm-gaudi to upstream vLLM commit
cfaf4668f(PR #36610 "[kv_offload+HMA][1/N]: Support multiple KV groups in OffloadingSpec") which introduced breaking changes to the offloading connector APIs.Changes
1.
tests/unit_tests/kv_offload/test_offloading_connector.pyKVCacheConfigand pass it toOffloadingConnectorconstructor (now required by upstream assertion)2.
vllm_gaudi/v1/kv_offload/worker/cpu_hpu.pyget_handlersto use new attribute names:self.gpu_block_sizeis nowtuple[int, ...]→ extract withself.gpu_block_size[0]self.offloaded_block_sizeremoved → compute asgpu_block_size * self.block_size_factorVerified on HPU
CI Run (Failure)
https://github.com/vllm-project/vllm-gaudi/actions/runs/23042890934
Jira
GAUDISW-247307