[Refactor] Remove unused dead code (#36171)
Signed-off-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
@@ -1396,9 +1396,6 @@ class MoRIIOConnectorWorker:
|
||||
remote_ip=meta.remote_host,
|
||||
)
|
||||
|
||||
def _is_last_layer(self, layer_name):
|
||||
return layer_name == list(self.kv_caches.keys())[-1]
|
||||
|
||||
def merge_contiguous_blocks(
|
||||
self,
|
||||
offsets_local: list[int],
|
||||
|
||||
@@ -158,11 +158,6 @@ class DeepEPLLPrepareAndFinalize(mk.FusedMoEPrepareAndFinalizeModular):
|
||||
return topk_ids
|
||||
return self.global_to_physical[topk_ids]
|
||||
|
||||
def _map_local_to_global_ids(self, expert_topk_ids: torch.Tensor) -> torch.Tensor:
|
||||
if self.local_expert_global_ids is None:
|
||||
return expert_topk_ids
|
||||
return self.local_expert_global_ids[expert_topk_ids]
|
||||
|
||||
def _do_quant(
|
||||
self,
|
||||
x: torch.Tensor | tuple[torch.Tensor, torch.Tensor],
|
||||
|
||||
@@ -316,27 +316,6 @@ def normalize_batched_scales_shape(
|
||||
return scales
|
||||
|
||||
|
||||
def _validate_scale_shape(
|
||||
a: torch.Tensor,
|
||||
a_scale: torch.Tensor | None,
|
||||
per_act_token_quant: bool,
|
||||
block_shape: list[int] | None,
|
||||
) -> None:
|
||||
if a_scale is None:
|
||||
return
|
||||
|
||||
if not per_act_token_quant and block_shape is None:
|
||||
assert a_scale.numel() == 1, f"{a_scale.shape}"
|
||||
elif per_act_token_quant:
|
||||
assert a_scale.shape[0] == a.shape[0] and a_scale.shape[1] == 1, (
|
||||
f"{a_scale.shape[0]} == {a.shape[0]} and {a_scale.shape[1]} == 1"
|
||||
)
|
||||
else:
|
||||
assert block_shape is not None
|
||||
expected = (a.shape[0], cdiv(a.shape[1], block_shape[1]))
|
||||
assert a_scale.shape == expected, f"{a_scale.shape} == {expected}"
|
||||
|
||||
|
||||
# Torch custom ops can't deal with outputs aliasing inputs so we need to
|
||||
# disable inplace for torch >= 2.9.
|
||||
# See https://github.com/vllm-project/vllm/issues/26378
|
||||
|
||||
Reference in New Issue
Block a user