[Hybrid] Pass kernel block size to builders (#27753)

Signed-off-by: Thomas Parnell <tpa@zurich.ibm.com>
This commit is contained in:
Thomas Parnell
2025-11-03 06:48:03 +01:00
committed by GitHub
parent 470ad118b6
commit 18961c5ea6
4 changed files with 62 additions and 27 deletions

View File

@@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
import copy
from dataclasses import dataclass, fields
from dataclasses import dataclass, fields, replace
from math import prod
import torch
@@ -44,6 +44,12 @@ class KVCacheSpec:
"""
raise NotImplementedError
def copy_with_new_block_size(self, block_size: int) -> Self:
"""
Create a new KVCacheSpec from self but replacing the block size.
"""
return replace(self, block_size=block_size)
@classmethod
def merge(cls, specs: list[Self]) -> Self:
"""