[Mini-VLLM] Cut dead subsystems across serving, connectors, parsers
- Remove P/D transfer connectors: nixl, nixl_chat, mooncake x2, hf3fs, moriio, hisparse, example and hidden-states connectors - Reduce weight_transfer to the base API used by model loading - Remove kv_offload tiering, simple_kv_offload, ec cpu/example, snapshot command, engine snapshot server - Remove transformers model fallback, dsv4 tokenizers, dead platforms cpu/tpu/xpu, flashmla third_party, dsa, megamoe/flydsl, dead attn ops, dead layers (short_conv, fused_embed_norm, indexer_topk, relu2 gemma_ar, lightning_attn, minimax_rms_norm), gemm_rs_ar - Keep MoE LoRA op (imported eagerly by punica_gpu); drop fp8 variant - Rebuild parser hubs around Qwen3 adapters only (36 dead adapters) - Remove dead tests with the code they covered Co-authored-by: Hinata <hinata@idihore.id> Signed-off-by: MOVZX <movzx@yahoo.com>
This commit is contained in:
@@ -6,7 +6,6 @@ import traceback
|
||||
from itertools import chain
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from vllm import envs
|
||||
from vllm.plugins import PLATFORM_PLUGINS_GROUP, load_plugins_by_group
|
||||
from vllm.utils.import_utils import resolve_obj_by_qualname
|
||||
|
||||
@@ -125,80 +124,13 @@ def _is_amd_zen_cpu() -> bool:
|
||||
return "AuthenticAMD" in cpuinfo and "avx512" in cpuinfo
|
||||
|
||||
|
||||
def cpu_platform_plugin() -> str | None:
|
||||
logger.debug("Checking if CPU platform is available.")
|
||||
is_cpu = envs.VLLM_TARGET_DEVICE == "cpu"
|
||||
if is_cpu:
|
||||
logger.debug(
|
||||
"Confirmed CPU platform is available because "
|
||||
"VLLM_TARGET_DEVICE is set to CPU."
|
||||
)
|
||||
else:
|
||||
try:
|
||||
is_cpu = vllm_version_matches_substr("cpu")
|
||||
if is_cpu:
|
||||
logger.debug(
|
||||
"Confirmed CPU platform is available because vLLM is built "
|
||||
"with CPU."
|
||||
)
|
||||
if not is_cpu:
|
||||
import sys
|
||||
|
||||
is_cpu = sys.platform.startswith("darwin")
|
||||
if is_cpu:
|
||||
logger.debug(
|
||||
"Confirmed CPU platform is available because the machine "
|
||||
"is MacOS."
|
||||
)
|
||||
except Exception as e:
|
||||
logger.debug("CPU platform is not available because: %s", str(e))
|
||||
|
||||
if not is_cpu:
|
||||
return None
|
||||
|
||||
if _is_amd_zen_cpu():
|
||||
try:
|
||||
import zentorch # noqa: F401
|
||||
|
||||
logger.info(
|
||||
"AMD Zen CPU detected with zentorch installed, using ZenCpuPlatform."
|
||||
)
|
||||
return "vllm.platforms.zen_cpu.ZenCpuPlatform"
|
||||
except ImportError:
|
||||
logger.debug(
|
||||
"AMD Zen CPU detected but zentorch not installed, "
|
||||
"falling back to CpuPlatform."
|
||||
)
|
||||
except OSError:
|
||||
# An ABI-mismatched build fails here with an undefined-symbol
|
||||
# error; other failures are not known to be safe to recover from.
|
||||
logger.warning(
|
||||
"AMD Zen CPU detected but zentorch failed to import, falling "
|
||||
"back to CpuPlatform. This usually means the zentorch build "
|
||||
"does not match the installed torch version.",
|
||||
exc_info=True,
|
||||
)
|
||||
|
||||
return "vllm.platforms.cpu.CpuPlatform"
|
||||
|
||||
|
||||
builtin_platform_plugins = {
|
||||
"cuda": cuda_platform_plugin,
|
||||
"rocm": rocm_platform_plugin,
|
||||
"cpu": cpu_platform_plugin,
|
||||
}
|
||||
|
||||
|
||||
def resolve_current_platform_cls_qualname() -> str:
|
||||
# An explicit CPU target is authoritative. Native CPU-only CI jobs reuse
|
||||
# an accelerator wheel and can run on accelerator hosts, so probing every
|
||||
# plugin would otherwise activate both CPU and the host accelerator.
|
||||
if envs.VLLM_TARGET_DEVICE == "cpu":
|
||||
cpu_platform_cls_qualname = cpu_platform_plugin()
|
||||
assert cpu_platform_cls_qualname is not None
|
||||
logger.debug("Explicitly selected CPU platform.")
|
||||
return cpu_platform_cls_qualname
|
||||
|
||||
platform_plugins = load_plugins_by_group(PLATFORM_PLUGINS_GROUP)
|
||||
|
||||
activated_plugins = []
|
||||
|
||||
Reference in New Issue
Block a user