New stable abi cleanup (#46656)

Signed-off-by: Chris Leonard <chleonar@redhat.com>
This commit is contained in:
Chris Leonard
2026-07-03 14:02:26 +08:00
committed by GitHub
parent 2dfaae752b
commit fbc9ba6d30
50 changed files with 96 additions and 44 deletions
+6 -13
View File
@@ -6,6 +6,7 @@ pynvml. However, it should not initialize cuda context.
from __future__ import annotations
import contextlib
import os
import platform
from collections.abc import Callable
@@ -20,6 +21,9 @@ from typing_extensions import ParamSpec
# import custom ops, trigger op registration
import vllm._C_stable_libtorch # noqa
with contextlib.suppress(ImportError):
import vllm._qutlass_C # noqa
import vllm.envs as envs
from vllm.logger import init_logger
from vllm.utils.import_utils import import_pynvml
@@ -39,11 +43,6 @@ else:
logger = init_logger(__name__)
try:
import vllm._qutlass_C # noqa: F401
except ImportError as e:
logger.warning("Failed to import from vllm._qutlass_C: %r", e)
_P = ParamSpec("_P")
_R = TypeVar("_R")
@@ -221,16 +220,10 @@ class CudaPlatformBase(Platform):
import vllm._C_stable_libtorch # noqa: F401
except ImportError as e:
logger.warning_once("Failed to import from vllm._C_stable_libtorch: %r", e)
try:
with contextlib.suppress(ImportError):
import vllm._moe_C_stable_libtorch # noqa: F401
except ImportError as e:
logger.warning_once(
"Failed to import from vllm._moe_C_stable_libtorch: %r", e
)
try:
with contextlib.suppress(ImportError):
import vllm._qutlass_C # noqa: F401
except ImportError as e:
logger.warning_once("Failed to import from vllm._qutlass_C: %r", e)
@property
def supported_dtypes(self) -> list[torch.dtype]: