[Refactor] Remove dead code multiple places (#61843)

Signed-off-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
Wentao Ye
2026-10-16 15:01:07 +00:00
committed by GitHub
parent 8a6c0449b3
commit 8e25bbca19
10 changed files with 14 additions and 168 deletions
+1 -33
View File
@@ -21,7 +21,7 @@ from vllm.v1.attention.ops.rocm_aiter_mla_sparse import (
)
if TYPE_CHECKING:
from aiter import ActivationType, QuantType
from aiter import ActivationType
logger = init_logger(__name__)
@@ -2202,38 +2202,6 @@ class rocm_aiter_ops:
}
return mapping.get(name)
@staticmethod
def get_aiter_quant_type(quant_type_str: str) -> "QuantType | None":
"""Given a quantization type as a string, returns the corresponding aiter QuantType enum.
Supported quantization types: "no", "per_tensor", "per_token", "per_1x32", "per_1x128", "per_128x128".
Returns None if the mapping fails.
Args:
quant_type_str (str): Quantization type as string.
Returns:
Aiter QuantType enum value, or None if not found.
"""
try:
from aiter import QuantType
except ImportError:
return None
if not isinstance(quant_type_str, str):
return None
name = quant_type_str.strip().lower()
mapping = {
"no": QuantType.No,
"per_tensor": QuantType.per_Tensor,
"per_token": QuantType.per_Token,
"per_1x32": QuantType.per_1x32,
"per_1x128": QuantType.per_1x128,
"per_128x128": QuantType.per_128x128,
}
return mapping.get(name)
@classmethod
@if_aiter_supported
def is_enabled(cls) -> bool: