Skip to content

Commit

Permalink
Ignore types in mypy checks
Browse files Browse the repository at this point in the history
  • Loading branch information
jkaniecki authored Nov 14, 2024
1 parent 7f62153 commit 891f311
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions vllm/worker/hpu_model_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -963,19 +963,19 @@ def _prepare_prompt(
else:
prefix_block_list_tensor = None

input_tokens = make_tensor_with_pad(input_tokens,
input_tokens = make_tensor_with_pad(input_tokens, # type: ignore
max_len=max_prompt_len,
pad=0,
dtype=torch.long,
device='cpu')

input_positions = make_tensor_with_pad(input_positions,
input_positions = make_tensor_with_pad(input_positions, # type: ignore
max_len=max_prompt_len,
pad=0,
dtype=torch.long,
device='cpu')

slot_mapping = make_tensor_with_pad(slot_mapping,
slot_mapping = make_tensor_with_pad(slot_mapping, # type: ignore
max_len=max_prompt_len,
pad=_PAD_SLOT_ID,
dtype=torch.long,
Expand Down Expand Up @@ -1102,14 +1102,14 @@ def _prepare_decode(
block_tables.append(block_table)

if output is None:
input_tokens = torch.tensor(input_tokens,
input_tokens = torch.tensor(input_tokens, # type: ignore
dtype=torch.long,
device='cpu')
else:
real_batch_size = len(seq_group_metadata_list)
input_tokens = output[:real_batch_size]

input_positions = torch.tensor(input_positions,
input_positions = torch.tensor(input_positions, # type: ignore
dtype=torch.long,
device='cpu')

Expand Down Expand Up @@ -1153,16 +1153,16 @@ def _prepare_decode(
block_groups = padding_fn(block_groups, -1)
block_usage = padding_fn(block_usage, 1)

block_list = torch.tensor(block_list,
block_list = torch.tensor(block_list, # type: ignore
dtype=torch.int,
device='cpu')
block_groups = torch.tensor(block_groups,
block_groups = torch.tensor(block_groups, # type: ignore
dtype=torch.int,
device='cpu')
block_usage = torch.tensor(block_usage,
block_usage = torch.tensor(block_usage, # type: ignore
dtype=self.model_config.dtype,
device='cpu')
slot_mapping = torch.tensor(slot_mapping,
slot_mapping = torch.tensor(slot_mapping, # type: ignore
dtype=torch.long,
device='cpu')

Expand Down

0 comments on commit 891f311

Please sign in to comment.