Skip to content

Commit

Permalink
fix num_cpu_blocks after changing block_size
Browse files Browse the repository at this point in the history
  • Loading branch information
luo-cheng2021 committed Mar 21, 2024
1 parent 5cb452d commit f2dd24e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vllm/executor/openvino_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ def __init__(

if device_config.device.type == "cpu":
if cache_config.block_size != 1:
print(f"Warning: CPU only support block_size = 1, current is {cache_config.block_size}, forced to 1.")
cache_config.num_cpu_blocks *= cache_config.block_size
cache_config.block_size = 1
print(f"Warning: CPU only support block_size = 1, it's forced to 1, num_cpu_blocks is set to {cache_config.num_cpu_blocks}.")
self.block_size = cache_config.block_size
self.num_gpu_blocks = cache_config.num_gpu_blocks
self.num_cpu_blocks = cache_config.num_cpu_blocks
Expand Down

0 comments on commit f2dd24e

Please sign in to comment.