Skip to content

Commit aab8956

Browse files
Simple code refactoring
- Remove unused functions - merged functions not called anywhere else Signed-off-by: Christian Pinto <christian.pinto@ibm.com>
1 parent e0ae311 commit aab8956

File tree

1 file changed

+9
-25
lines changed

1 file changed

+9
-25
lines changed

vllm/v1/worker/gpu_model_runner.py

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -558,11 +558,16 @@ def _update_states(self, scheduler_output: "SchedulerOutput") -> None:
558558
# Refresh batch metadata with any pending updates.
559559
self.input_batch.refresh_metadata()
560560

561-
def _add_multimodal_inputs_to_model_args(
561+
def _maybe_add_multimodal_kwargs(
562562
self,
563563
model_kwargs: dict[str, Any],
564-
scheduler_output: "SchedulerOutput",
565-
num_reqs: int = -1):
564+
scheduler_output: "SchedulerOutput" = None,
565+
num_reqs: int = -1,
566+
):
567+
568+
if not self.model_supports_multimodal_raw_input:
569+
return
570+
566571
# Multi-modal data.
567572
if scheduler_output:
568573
multi_modal_kwargs_list = []
@@ -585,28 +590,7 @@ def _add_multimodal_inputs_to_model_args(
585590

586591
model_kwargs.update(multi_modal_kwargs)
587592

588-
def _maybe_add_multimodal_kwargs(
589-
self,
590-
model_kwargs: dict[str, Any],
591-
scheduler_output: "SchedulerOutput" = None,
592-
num_reqs: int = -1):
593-
594-
if self.model_supports_multimodal_raw_input:
595-
self._add_multimodal_inputs_to_model_args(model_kwargs,
596-
scheduler_output,
597-
num_reqs)
598-
599-
def _maybe_compute_attn_prefix(
600-
self,
601-
scheduler_output: "SchedulerOutput",
602-
) -> list[int]:
603-
return [0] * len(self.kv_cache_config.kv_cache_groups)
604-
605-
def _maybe_prepare_additional_inputs(self,
606-
scheduler_output: "SchedulerOutput",
607-
token_indices: torch.Tensor):
608-
pass
609-
593+
610594
def _get_cumsum_and_arange(
611595
self,
612596
num_tokens: np.ndarray,

0 commit comments

Comments
 (0)