[Bugfix] Remove extra args from CPU's compute slot mapping kernel (#61992)
Signed-off-by: Fadi Arafeh <fadi.arafeh@arm.com> Co-authored-by: vllm-agent <claw@inferact.ai>
This commit is contained in:
co-authored by
vllm-agent
parent
dcd07967ca
commit
556ac15eb9
@@ -16,10 +16,8 @@ def _compute_slot_mapping_kernel_impl(
|
||||
positions: torch.Tensor, # [num_tokens], int64
|
||||
block_table: torch.Tensor, # [max_num_reqs, max_num_blocks_per_req], int32
|
||||
block_table_stride: int, # max_num_blocks_per_req
|
||||
block_size: int,
|
||||
slot_mapping: torch.Tensor, # [max_num_tokens], int64
|
||||
KV_CACHE_BLOCK_SIZE: int | None = None,
|
||||
BLOCKS_PER_KV_BLOCK: int = 1,
|
||||
KV_CACHE_BLOCK_SIZE: int,
|
||||
TOTAL_CP_WORLD_SIZE: int = 1,
|
||||
TOTAL_CP_RANK: int = 0,
|
||||
CP_KV_CACHE_INTERLEAVE_SIZE: int = 1,
|
||||
@@ -27,14 +25,12 @@ def _compute_slot_mapping_kernel_impl(
|
||||
BLOCK_SIZE: int = 1024,
|
||||
) -> None:
|
||||
assert TOTAL_CP_WORLD_SIZE == 1, "Context Parallelism is not supported on CPU."
|
||||
if BLOCKS_PER_KV_BLOCK != 1:
|
||||
assert block_size * BLOCKS_PER_KV_BLOCK == KV_CACHE_BLOCK_SIZE
|
||||
torch.ops._C.compute_slot_mapping_kernel_impl(
|
||||
query_start_loc,
|
||||
positions,
|
||||
block_table,
|
||||
slot_mapping,
|
||||
block_size,
|
||||
KV_CACHE_BLOCK_SIZE,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user