[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:
co-authored by
Claude Opus 5.5
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent
4694145045
commit
004e37ece2
@@ -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."""
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user