Skip to content

Commit 2fbf6d9

Browse files
committed
refact attn metadata build
Signed-off-by: weiguihua2 <[email protected]>
1 parent 06aa682 commit 2fbf6d9

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

tests/ut/attention/test_mla_v1.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -333,16 +333,6 @@ def test_build_dummy(self, mock_ascend_config):
333333
ascend_config = MagicMock()
334334
mock_ascend_config.return_value = ascend_config
335335
ascend_config.torchair_graph_config.enabled = False
336-
# runner = MagicMock()
337-
# runner.model_config = MagicMock()
338-
# runner.device = "cpu"
339-
# runner.graph_block_tables = torch.zeros((8, 64), dtype=torch.int32)
340-
# runner.model_config.get_head_size.return_value = 64
341-
# runner.chunked_prefill_enabled = False
342-
# runner.attn_mask = torch.zeros((1, 1), dtype=torch.bool)
343-
# runner.spec_attn_mask = torch.zeros((1, 1), dtype=torch.bool)
344-
# runner.dtype = torch.float16
345-
# runner.decode_token_per_req = 1
346336

347337
mock_vllm_config = MagicMock()
348338
mock_vllm_config.model_config.max_model_len = 1024

vllm_ascend/attention/attention_v1_torchair.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,6 @@ def build(
259259
query_start_loc = query_start_loc_cpu.to(self.device,
260260
non_blocking=True)
261261
query_lens = query_start_loc_cpu[1:] - query_start_loc_cpu[:-1]
262-
# input_positions = common_attn_metadata.positions_cpu[:num_actual_tokens].to(
263-
# device, non_blocking=True).long()
264-
265262
input_positions = common_attn_metadata.positions[:
266263
num_actual_tokens].long(
267264
)

0 commit comments

Comments
 (0)