[Refactor] Remove dead private func _fp8_perm and _extract_mask_for_item (#35068)

Signed-off-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
Wentao Ye
2026-02-23 05:05:20 -08:00
committed by GitHub
parent 103e614b14
commit 7f40e9e516
2 changed files with 0 additions and 46 deletions
@@ -284,16 +284,6 @@ def moe_kernel_quantize_input(
return A, A_scale
def _fp8_perm(m: torch.Tensor, idx: torch.Tensor) -> torch.Tensor:
"""
A permutation routine that works on fp8 types.
"""
if torch.is_floating_point(m) and m.dtype.itemsize == 1:
return m.view(dtype=torch.uint8)[idx, ...].view(dtype=m.dtype)
else:
return m[idx, ...]
def normalize_scales_shape(scales: torch.Tensor | None) -> torch.Tensor | None:
if scales is not None:
if scales.numel() == 1: