[Misc] Name each backend and its kernel block sizes in block-size errors (#58557)

Signed-off-by: Eugenio "Jay" Zuccarelli <11176606+jayzuccarelli@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Eugenio "Jay" Zuccarelli
2026-09-28 14:33:18 +08:00
committed by GitHub
co-authored by Claude Opus 5.5 mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent 4694145045
commit 004e37ece2
4 changed files with 15 additions and 1 deletions
+3
View File
@@ -54,6 +54,9 @@ class MultipleOf:
def __init__(self, base: int):
self.base = base
def __repr__(self) -> str:
return f"MultipleOf({self.base})"
class AttentionBackend(ABC):
"""Abstract class for attention backends."""
+7 -1
View File
@@ -383,7 +383,13 @@ def select_common_block_size(
for size in sorted(candidates, reverse=True):
if block_size_is_supported(backends, size):
return size
raise ValueError(f"No common block size for {kv_manager_block_size}.")
raise ValueError(
f"No common block size for {kv_manager_block_size} ("
+ "; ".join(
f"{b.get_name()}: {b.get_supported_kernel_block_sizes()}" for b in backends
)
+ ")."
)
def allocate_kv_cache(