Skip to content

Commit 38c5dea

Browse files
committed
refact model runner
Signed-off-by: weiguihua2 <[email protected]>
1 parent d4d9ee2 commit 38c5dea

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

vllm_ascend/torchair/torchair_attention.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from vllm.attention.backends.abstract import (AttentionImpl, AttentionLayer,
2626
AttentionType)
2727
from vllm.attention.backends.utils import PAD_SLOT_ID
28+
from vllm.config import VllmConfig
2829
from vllm.utils import cdiv
2930

3031
from vllm_ascend.attention.attention_v1 import (AscendAttentionBackend,
@@ -97,8 +98,10 @@ class AscendTorchairMetadata(AscendMetadata):
9798

9899
class AscendAttentionTorchairMetadataBuilder(AscendAttentionMetadataBuilder):
99100

100-
def __init__(self, runner):
101-
super().__init__(runner)
101+
def __init__(self,
102+
vllm_config: VllmConfig,
103+
device: torch.device,):
104+
super().__init__(vllm_config, device)
102105
self.max_num_blocks_per_req = cdiv(
103106
self.model_config.max_model_len,
104107
self.vllm_config.cache_config.block_size)

0 commit comments

Comments
 (0)