Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
e255d929
Unverified
Commit
e255d929
authored
Oct 23, 2025
by
Jonathan Chen
Committed by
GitHub
Oct 23, 2025
Browse files
[Chore] Remove duplicate `has_` functions in vllm.utils (#27372)
Signed-off-by:
Jonathan
<
chenleejonathan@gmail.com
>
parent
3729ed00
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
41 deletions
+0
-41
vllm/utils/__init__.py
vllm/utils/__init__.py
+0
-41
No files found.
vllm/utils/__init__.py
View file @
e255d929
...
@@ -5,7 +5,6 @@ import contextlib
...
@@ -5,7 +5,6 @@ import contextlib
import
datetime
import
datetime
import
enum
import
enum
import
getpass
import
getpass
import
importlib.util
import
inspect
import
inspect
import
json
import
json
import
multiprocessing
import
multiprocessing
...
@@ -1048,46 +1047,6 @@ def check_use_alibi(model_config: ModelConfig) -> bool:
...
@@ -1048,46 +1047,6 @@ def check_use_alibi(model_config: ModelConfig) -> bool:
)
)
@
cache
def
_has_module
(
module_name
:
str
)
->
bool
:
"""Return True if *module_name* can be found in the current environment.
The result is cached so that subsequent queries for the same module incur
no additional overhead.
"""
return
importlib
.
util
.
find_spec
(
module_name
)
is
not
None
def
has_pplx
()
->
bool
:
"""Whether the optional `pplx_kernels` package is available."""
return
_has_module
(
"pplx_kernels"
)
def
has_deep_ep
()
->
bool
:
"""Whether the optional `deep_ep` package is available."""
return
_has_module
(
"deep_ep"
)
def
has_deep_gemm
()
->
bool
:
"""Whether the optional `deep_gemm` package is available."""
return
_has_module
(
"deep_gemm"
)
def
has_triton_kernels
()
->
bool
:
"""Whether the optional `triton_kernels` package is available."""
return
_has_module
(
"triton_kernels"
)
def
has_tilelang
()
->
bool
:
"""Whether the optional `tilelang` package is available."""
return
_has_module
(
"tilelang"
)
def
length_from_prompt_token_ids_or_embeds
(
def
length_from_prompt_token_ids_or_embeds
(
prompt_token_ids
:
list
[
int
]
|
None
,
prompt_token_ids
:
list
[
int
]
|
None
,
prompt_embeds
:
torch
.
Tensor
|
None
,
prompt_embeds
:
torch
.
Tensor
|
None
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment