Skip to content

Commit e255d92

Browse files
authored
[Chore] Remove duplicate has_ functions in vllm.utils (#27372)
Signed-off-by: Jonathan <chenleejonathan@gmail.com>
1 parent 3729ed0 commit e255d92

File tree

1 file changed

+0
-41
lines changed

1 file changed

+0
-41
lines changed

vllm/utils/__init__.py

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import datetime
66
import enum
77
import getpass
8-
import importlib.util
98
import inspect
109
import json
1110
import multiprocessing
@@ -1048,46 +1047,6 @@ def check_use_alibi(model_config: ModelConfig) -> bool:
10481047
)
10491048

10501049

1051-
@cache
1052-
def _has_module(module_name: str) -> bool:
1053-
"""Return True if *module_name* can be found in the current environment.
1054-
1055-
The result is cached so that subsequent queries for the same module incur
1056-
no additional overhead.
1057-
"""
1058-
return importlib.util.find_spec(module_name) is not None
1059-
1060-
1061-
def has_pplx() -> bool:
1062-
"""Whether the optional `pplx_kernels` package is available."""
1063-
1064-
return _has_module("pplx_kernels")
1065-
1066-
1067-
def has_deep_ep() -> bool:
1068-
"""Whether the optional `deep_ep` package is available."""
1069-
1070-
return _has_module("deep_ep")
1071-
1072-
1073-
def has_deep_gemm() -> bool:
1074-
"""Whether the optional `deep_gemm` package is available."""
1075-
1076-
return _has_module("deep_gemm")
1077-
1078-
1079-
def has_triton_kernels() -> bool:
1080-
"""Whether the optional `triton_kernels` package is available."""
1081-
1082-
return _has_module("triton_kernels")
1083-
1084-
1085-
def has_tilelang() -> bool:
1086-
"""Whether the optional `tilelang` package is available."""
1087-
1088-
return _has_module("tilelang")
1089-
1090-
10911050
def length_from_prompt_token_ids_or_embeds(
10921051
prompt_token_ids: list[int] | None,
10931052
prompt_embeds: torch.Tensor | None,

0 commit comments

Comments
 (0)