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
257ab954
Unverified
Commit
257ab954
authored
Jun 18, 2025
by
wangxiyuan
Committed by
GitHub
Jun 18, 2025
Browse files
[Platform] Allow platform use V1 Engine by default (#19792)
Signed-off-by:
wangxiyuan
<
wangxiyuan1007@gmail.com
>
parent
cca91a7a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
9 deletions
+20
-9
vllm/engine/arg_utils.py
vllm/engine/arg_utils.py
+5
-9
vllm/platforms/cpu.py
vllm/platforms/cpu.py
+8
-0
vllm/platforms/interface.py
vllm/platforms/interface.py
+7
-0
No files found.
vllm/engine/arg_utils.py
View file @
257ab954
...
@@ -1303,7 +1303,7 @@ class EngineArgs:
...
@@ -1303,7 +1303,7 @@ class EngineArgs:
# Skip this check if we are running on a non-GPU platform,
# Skip this check if we are running on a non-GPU platform,
# or if the device capability is not available
# or if the device capability is not available
# (e.g. in a Ray actor without GPUs).
# (e.g. in a Ray actor without GPUs).
from
vllm.platforms
import
CpuArchEnum
,
current_platform
from
vllm.platforms
import
current_platform
if
(
current_platform
.
is_cuda
()
if
(
current_platform
.
is_cuda
()
and
current_platform
.
get_device_capability
()
and
current_platform
.
get_device_capability
()
and
current_platform
.
get_device_capability
().
major
<
8
):
and
current_platform
.
get_device_capability
().
major
<
8
):
...
@@ -1445,13 +1445,9 @@ class EngineArgs:
...
@@ -1445,13 +1445,9 @@ class EngineArgs:
_raise_or_fallback
(
feature_name
=
name
,
recommend_to_remove
=
False
)
_raise_or_fallback
(
feature_name
=
name
,
recommend_to_remove
=
False
)
return
False
return
False
# Non-[CUDA, TPU, x86 CPU] may be supported on V1,
# The platform may be supported on V1, but off by default for now.
# but off by default for now.
if
not
current_platform
.
default_v1
(
# noqa: SIM103
v0_hardware
=
not
any
(
model_config
=
model_config
)
and
_warn_or_fallback
(
(
current_platform
.
is_cuda_alike
(),
current_platform
.
is_tpu
(),
(
current_platform
.
is_cpu
()
and
current_platform
.
get_cpu_architecture
()
==
CpuArchEnum
.
X86
)))
if
v0_hardware
and
_warn_or_fallback
(
# noqa: SIM103
current_platform
.
device_name
):
current_platform
.
device_name
):
return
False
return
False
#############################################################
#############################################################
...
...
vllm/platforms/cpu.py
View file @
257ab954
...
@@ -269,3 +269,11 @@ class CpuPlatform(Platform):
...
@@ -269,3 +269,11 @@ class CpuPlatform(Platform):
model configuration.
model configuration.
"""
"""
return
True
return
True
@
classmethod
def
default_v1
(
cls
,
model_config
)
->
bool
:
"""Returns whether the current platform can use v1 by default for the
supplied model configuration.
"""
return
cls
.
supports_v1
(
model_config
)
and
cls
.
get_cpu_architecture
()
==
CpuArchEnum
.
X86
vllm/platforms/interface.py
View file @
257ab954
...
@@ -479,6 +479,13 @@ class Platform:
...
@@ -479,6 +479,13 @@ class Platform:
"""
"""
return
False
return
False
@
classmethod
def
default_v1
(
cls
,
model_config
:
ModelConfig
)
->
bool
:
"""
Returns whether the current platform supports v1 by default.
"""
return
cls
.
supports_v1
(
model_config
)
@
classmethod
@
classmethod
def
use_custom_allreduce
(
cls
)
->
bool
:
def
use_custom_allreduce
(
cls
)
->
bool
:
"""
"""
...
...
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