A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 6, 07:00 UTC
[Refactor] Remove unused dead code (#36171)
Signed-off-by: yewentao256 <zhyanwentao@126.com>
Wentao Ye committed
Mar 20, 2026 at 18:12 UTC
b3d0b37908c349ddbb1591bdf2325af15cd21620
3 files changed
-29
vllm/distributed/kv_transfer/kv_connector/v1/moriio/moriio_connector.py
-3
@@ -1396,9 +1396,6 @@ class MoRIIOConnectorWorker:
1396
remote_ip=meta.remote_host,
1397
)
1398
1399
- def _is_last_layer(self, layer_name):
1400
- return layer_name == list(self.kv_caches.keys())[-1]
1401
-
1399
def merge_contiguous_blocks(
1400
self,
1401
offsets_local: list[int],
vllm/model_executor/layers/fused_moe/deepep_ll_prepare_finalize.py
-5
@@ -158,11 +158,6 @@ class DeepEPLLPrepareAndFinalize(mk.FusedMoEPrepareAndFinalizeModular):
158
return topk_ids
159
return self.global_to_physical[topk_ids]
160
161
- def _map_local_to_global_ids(self, expert_topk_ids: torch.Tensor) -> torch.Tensor:
162
- if self.local_expert_global_ids is None:
163
- return expert_topk_ids
164
- return self.local_expert_global_ids[expert_topk_ids]
165
-
161
def _do_quant(
162
self,
163
x: torch.Tensor | tuple[torch.Tensor, torch.Tensor],
vllm/model_executor/layers/fused_moe/utils.py
-21
@@ -316,27 +316,6 @@ def normalize_batched_scales_shape(
316
return scales
317
318
319
-def _validate_scale_shape(
320
- a: torch.Tensor,
321
- a_scale: torch.Tensor | None,
322
- per_act_token_quant: bool,
323
- block_shape: list[int] | None,
324
-) -> None:
325
- if a_scale is None:
326
- return
327
-
328
- if not per_act_token_quant and block_shape is None:
329
- assert a_scale.numel() == 1, f"{a_scale.shape}"
330
- elif per_act_token_quant:
331
- assert a_scale.shape[0] == a.shape[0] and a_scale.shape[1] == 1, (
332
- f"{a_scale.shape[0]} == {a.shape[0]} and {a_scale.shape[1]} == 1"
333
- )
334
- else:
335
- assert block_shape is not None
336
- expected = (a.shape[0], cdiv(a.shape[1], block_shape[1]))
337
- assert a_scale.shape == expected, f"{a_scale.shape} == {expected}"
338
-
339
-
319
# Torch custom ops can't deal with outputs aliasing inputs so we need to
320
# disable inplace for torch >= 2.9.
321
# See https://github.com/vllm-project/vllm/issues/26378