Skip to content

Commit

Permalink
Revert "Allocate blocks from id=1 for HPU (#160)" (#163)
Browse files Browse the repository at this point in the history
This reverts commit b43c7f9.
  • Loading branch information
kzawora-intel authored Aug 6, 2024
1 parent b43c7f9 commit 37ca17f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions vllm/core/block/cpu_gpu_block_allocator.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
DeviceAwareBlockAllocator)
from vllm.core.block.naive_block import NaiveBlock, NaiveBlockAllocator
from vllm.core.block.prefix_caching_block import PrefixCachingBlockAllocator
from vllm.utils import Device, is_hpu
from vllm.utils import Device


class CpuGpuBlockAllocator(DeviceAwareBlockAllocator):
Expand Down Expand Up @@ -52,9 +52,7 @@ def create(
- The block IDs are assigned contiguously, with GPU block IDs coming
before CPU block IDs.
"""
# For HPU block ids cannot be equal to 0
start_id = 1 if is_hpu() else 0
block_ids = list(range(start_id, num_gpu_blocks + num_cpu_blocks))
block_ids = list(range(num_gpu_blocks + num_cpu_blocks))
gpu_block_ids = block_ids[:num_gpu_blocks]
cpu_block_ids = block_ids[num_gpu_blocks:]

Expand Down

0 comments on commit 37ca17f

Please sign in to comment.