File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 3
3
import torch
4
4
5
5
from tests .ut .base import TestBase
6
+ from vllm_ascend .attention .attention_v1 import \
7
+ AscendAttentionBackendImpl092 # isort: skip
6
8
from vllm_ascend .attention .attention_v1 import (AscendAttentionBackend ,
7
9
AscendAttentionBackendImpl ,
8
10
AscendAttentionMetadataBuilder ,
9
11
AscendAttentionState ,
10
12
AscendMetadata ,
11
13
CommonAttentionState )
14
+ from vllm_ascend .utils import vllm_version_is
12
15
13
16
14
17
class TestAscendAttentionBackend (TestBase ):
@@ -17,8 +20,12 @@ def test_get_name(self):
17
20
self .assertEqual (AscendAttentionBackend .get_name (), "ASCEND" )
18
21
19
22
def test_get_impl_cls (self ):
20
- self .assertEqual (AscendAttentionBackend .get_impl_cls (),
21
- AscendAttentionBackendImpl )
23
+ if vllm_version_is ("0.9.2" ):
24
+ self .assertEqual (AscendAttentionBackend .get_impl_cls (),
25
+ AscendAttentionBackendImpl092 )
26
+ else :
27
+ self .assertEqual (AscendAttentionBackend .get_impl_cls (),
28
+ AscendAttentionBackendImpl )
22
29
23
30
def test_get_metadata_cls (self ):
24
31
self .assertEqual (AscendAttentionBackend .get_metadata_cls (),
Original file line number Diff line number Diff line change @@ -1247,6 +1247,7 @@ def __init__(
1247
1247
attn_type : str = AttentionType .DECODER ,
1248
1248
kv_sharing_target_layer_name : Optional [str ] = None ,
1249
1249
use_irope : bool = False ,
1250
+ ** kwargs
1250
1251
) -> None :
1251
1252
super ().__init__ (
1252
1253
num_heads = num_heads ,
@@ -1260,4 +1261,5 @@ def __init__(
1260
1261
attn_type = attn_type ,
1261
1262
kv_sharing_target_layer_name = kv_sharing_target_layer_name ,
1262
1263
use_irope = use_irope ,
1264
+ ** kwargs
1263
1265
)
You can’t perform that action at this time.
0 commit comments