Skip to content

Commit 0453b2c

Browse files
clean code
Signed-off-by: shikang-hangzhou <459956190@qq.com>
1 parent 7950ee4 commit 0453b2c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

vllm_ascend/multistream/ms_split.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ def model_input_split_v1_mla_attn(
7272
attn_metadata.query_lens):
7373
return [attn_metadata]
7474

75-
query_start_loc_cpu = np.zeros(shape=(len(attn_metadata.query_lens) + 1, ),
75+
query_start_loc_cpu: Any = np.zeros(shape=(len(attn_metadata.query_lens) + 1, ),
7676
dtype=int)
7777
np.cumsum(attn_metadata.query_lens, out=query_start_loc_cpu[1:])
7878
if attn_metadata.num_prefills > 0:
79-
prefill_query_start_loc = np.zeros(
79+
prefill_query_start_loc: Any = np.zeros(
8080
shape=(len(attn_metadata.prefill.query_lens) + 1, ), dtype=int)
8181
np.cumsum(attn_metadata.prefill.query_lens,
8282
out=prefill_query_start_loc[1:])

vllm_ascend/worker/model_runner_v1.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import weakref
2727
from contextlib import contextmanager, nullcontext
2828
from dataclasses import dataclass
29-
from typing import TYPE_CHECKING, Dict, List, Optional, Union
29+
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union
3030

3131
import numpy as np
3232
import numpy.typing as npt
@@ -1160,7 +1160,7 @@ def _calc_spec_decode_metadata(
11601160

11611161
# Compute the logits indices.
11621162
# [4, 1, 3, 1, 2]
1163-
num_sampled_tokens = num_draft_tokens + 1
1163+
num_sampled_tokens: Any = num_draft_tokens + 1
11641164
# Step 1. [4, 5, 8, 9, 11]
11651165
cu_num_sampled_tokens = np.cumsum(num_sampled_tokens, dtype=np.int32)
11661166
total_num_sampled_tokens = cu_num_sampled_tokens[-1]

0 commit comments

Comments
 (0)