Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions vllm_gaudi/attention/backends/hpu_attn.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import os
from dataclasses import dataclass
from typing import Any, Optional
from typing import Optional

import torch
import vllm_gaudi.extension.kernels as kernels
Expand Down Expand Up @@ -161,7 +161,6 @@ def __init__(
alibi_slopes: Optional[list[float]],
sliding_window: Optional[int],
kv_cache_dtype: str,
blocksparse_params: Optional[dict[str, Any]],
logits_soft_cap: Optional[float],
attn_type: str,
kv_sharing_target_layer_name: Optional[str] = None,
Expand All @@ -170,7 +169,7 @@ def __init__(
torch.nn.Module.__init__(self)
MLACommonImpl.__init__(self, num_heads, head_size, scale, num_kv_heads,
alibi_slopes, sliding_window, kv_cache_dtype,
blocksparse_params, logits_soft_cap, attn_type,
logits_soft_cap, attn_type,
kv_sharing_target_layer_name, **kwargs)
self.enable_fp8_attn = kv_cache_dtype == 'fp8_inc' and os.environ.get(
'QUANT_CONFIG', None) is None
Expand All @@ -191,13 +190,11 @@ def __init__(
assert self.prefill_impl != 'fsdpa_impl' or alibi_slopes is None, \
'Prefill with FusedSDPA not supported with alibi slopes!'

unsupported_features = [
alibi_slopes, sliding_window, blocksparse_params, logits_soft_cap
]
unsupported_features = [alibi_slopes, sliding_window, logits_soft_cap]
if any(unsupported_features):
raise NotImplementedError(
"HPUMLAImpl does not support one of the following: "
"alibi_slopes, sliding_window, blocksparse_params, "
"alibi_slopes, sliding_window, "
"logits_soft_cap")

if attn_type != AttentionType.DECODER:
Expand Down Expand Up @@ -379,7 +376,6 @@ def __init__(
alibi_slopes: Optional[list[float]],
sliding_window: Optional[int],
kv_cache_dtype: str,
blocksparse_params: Optional[dict[str, Any]] = None,
logits_soft_cap: Optional[float] = None,
attn_type: str = AttentionType.DECODER,
kv_sharing_target_layer_name: Optional[str] = None,
Expand Down
Loading