Skip to content
This repository was archived by the owner on Sep 4, 2025. It is now read-only.

Commit 37ca17f

Browse files
Revert "Allocate blocks from id=1 for HPU (#160)" (#163)
This reverts commit b43c7f9.
1 parent b43c7f9 commit 37ca17f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

vllm/core/block/cpu_gpu_block_allocator.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
DeviceAwareBlockAllocator)
55
from vllm.core.block.naive_block import NaiveBlock, NaiveBlockAllocator
66
from vllm.core.block.prefix_caching_block import PrefixCachingBlockAllocator
7-
from vllm.utils import Device, is_hpu
7+
from vllm.utils import Device
88

99

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

0 commit comments

Comments
 (0)