Unverified Commit de2cc3d8 authored by Wentao Ye's avatar Wentao Ye Committed by GitHub
Browse files

[Deprecation] Remove DeepGEMM Old Symbol Wrapper (#24902)


Signed-off-by: default avataryewentao256 <zhyanwentao@126.com>
parent e9508430
...@@ -67,23 +67,6 @@ def _missing(*_: Any, **__: Any) -> NoReturn: ...@@ -67,23 +67,6 @@ def _missing(*_: Any, **__: Any) -> NoReturn:
"package to enable FP8 kernels.") "package to enable FP8 kernels.")
def _resolve_symbol(module, new: str, old: str) -> Callable[..., Any] | None:
"""Return the *new* symbol if it exists, otherwise the *old* one."""
if hasattr(module, new):
return getattr(module, new)
if hasattr(module, old):
# TODO(wentao): deprecate old symbol in the future.
logger.warning_once(
"Found legacy DeepGEMM symbol `%s`. Please upgrade the `deep_gemm` "
"package so that `%s` is available. Support for the legacy symbol "
"will be removed in a future vLLM release.",
old,
new,
)
return getattr(module, old)
return None
_fp8_gemm_nt_impl: Callable[..., Any] | None = None _fp8_gemm_nt_impl: Callable[..., Any] | None = None
_grouped_impl: Callable[..., Any] | None = None _grouped_impl: Callable[..., Any] | None = None
_grouped_masked_impl: Callable[..., Any] | None = None _grouped_masked_impl: Callable[..., Any] | None = None
...@@ -109,14 +92,9 @@ def _lazy_init() -> None: ...@@ -109,14 +92,9 @@ def _lazy_init() -> None:
_dg = importlib.import_module("deep_gemm") _dg = importlib.import_module("deep_gemm")
_fp8_gemm_nt_impl = _resolve_symbol(_dg, "fp8_gemm_nt", _fp8_gemm_nt_impl = getattr(_dg, "fp8_gemm_nt", None)
"gemm_fp8_fp8_bf16_nt") _grouped_impl = getattr(_dg, "m_grouped_fp8_gemm_nt_contiguous", None)
_grouped_impl = _resolve_symbol( _grouped_masked_impl = getattr(_dg, "fp8_m_grouped_gemm_nt_masked", None)
_dg, "m_grouped_fp8_gemm_nt_contiguous",
"m_grouped_gemm_fp8_fp8_bf16_nt_contiguous")
_grouped_masked_impl = _resolve_symbol(
_dg, "fp8_m_grouped_gemm_nt_masked",
"m_grouped_gemm_fp8_fp8_bf16_nt_masked")
def fp8_gemm_nt(*args, **kwargs): def fp8_gemm_nt(*args, **kwargs):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment