Skip to content

Commit de2cc3d

Browse files
authored
[Deprecation] Remove DeepGEMM Old Symbol Wrapper (vllm-project#24902)
Signed-off-by: yewentao256 <[email protected]>
1 parent e950843 commit de2cc3d

File tree

1 file changed

+3
-25
lines changed

1 file changed

+3
-25
lines changed

vllm/utils/deep_gemm.py

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -67,23 +67,6 @@ def _missing(*_: Any, **__: Any) -> NoReturn:
6767
"package to enable FP8 kernels.")
6868

6969

70-
def _resolve_symbol(module, new: str, old: str) -> Callable[..., Any] | None:
71-
"""Return the *new* symbol if it exists, otherwise the *old* one."""
72-
if hasattr(module, new):
73-
return getattr(module, new)
74-
if hasattr(module, old):
75-
# TODO(wentao): deprecate old symbol in the future.
76-
logger.warning_once(
77-
"Found legacy DeepGEMM symbol `%s`. Please upgrade the `deep_gemm` "
78-
"package so that `%s` is available. Support for the legacy symbol "
79-
"will be removed in a future vLLM release.",
80-
old,
81-
new,
82-
)
83-
return getattr(module, old)
84-
return None
85-
86-
8770
_fp8_gemm_nt_impl: Callable[..., Any] | None = None
8871
_grouped_impl: Callable[..., Any] | None = None
8972
_grouped_masked_impl: Callable[..., Any] | None = None
@@ -109,14 +92,9 @@ def _lazy_init() -> None:
10992

11093
_dg = importlib.import_module("deep_gemm")
11194

112-
_fp8_gemm_nt_impl = _resolve_symbol(_dg, "fp8_gemm_nt",
113-
"gemm_fp8_fp8_bf16_nt")
114-
_grouped_impl = _resolve_symbol(
115-
_dg, "m_grouped_fp8_gemm_nt_contiguous",
116-
"m_grouped_gemm_fp8_fp8_bf16_nt_contiguous")
117-
_grouped_masked_impl = _resolve_symbol(
118-
_dg, "fp8_m_grouped_gemm_nt_masked",
119-
"m_grouped_gemm_fp8_fp8_bf16_nt_masked")
95+
_fp8_gemm_nt_impl = getattr(_dg, "fp8_gemm_nt", None)
96+
_grouped_impl = getattr(_dg, "m_grouped_fp8_gemm_nt_contiguous", None)
97+
_grouped_masked_impl = getattr(_dg, "fp8_m_grouped_gemm_nt_masked", None)
12098

12199

122100
def fp8_gemm_nt(*args, **kwargs):

0 commit comments

Comments
 (0)