[code style] Clean dead triton kernel code in fused_moe and useless vllm_ops import (#8310)

This commit is contained in:
Xiaoyu Zhang
2025-07-24 14:38:30 +08:00
committed by GitHub
parent 2f86f3ad62
commit a167fd0bcb
3 changed files with 27 additions and 242 deletions

View File

@@ -28,15 +28,6 @@ if TYPE_CHECKING:
CompressedTensorsConfig,
)
_is_cuda = is_cuda()
_is_npu = is_npu()
_is_cpu_amx_available = cpu_has_amx_support()
_is_cpu = is_cpu()
_is_hip = is_hip()
if not (_is_cuda or _is_npu or (_is_cpu and _is_cpu_amx_available) or _is_hip):
from vllm import _custom_ops as vllm_ops
from vllm._custom_ops import scaled_fp8_quant
try:
import vllm
@@ -568,6 +559,8 @@ class CompressedTensorsWNA16MoEMethod(CompressedTensorsMoEMethod):
requires_grad=False,
)
from vllm import _custom_ops as vllm_ops
marlin_w13_qweight = vllm_ops.gptq_marlin_moe_repack(
layer.w13_weight_packed,
layer.w13_g_idx_sort_indices,