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
30215ca6
Unverified
Commit
30215ca6
authored
Apr 27, 2025
by
Jade Zheng
Committed by
GitHub
Apr 27, 2025
Browse files
[MISC] Use string annotation types for class definitions (#17244)
Signed-off-by:
Jade Zheng
<
zheng.shoujian@outlook.com
>
parent
838cedad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
10 deletions
+4
-10
vllm/platforms/cuda.py
vllm/platforms/cuda.py
+2
-5
vllm/platforms/rocm.py
vllm/platforms/rocm.py
+2
-5
No files found.
vllm/platforms/cuda.py
View file @
30215ca6
...
...
@@ -21,9 +21,6 @@ from .interface import DeviceCapability, Platform, PlatformEnum, _Backend
if
TYPE_CHECKING
:
from
vllm.config
import
ModelConfig
,
VllmConfig
else
:
ModelConfig
=
None
VllmConfig
=
None
logger
=
init_logger
(
__name__
)
...
...
@@ -109,7 +106,7 @@ class CudaPlatformBase(Platform):
pass
@
classmethod
def
check_and_update_config
(
cls
,
vllm_config
:
VllmConfig
)
->
None
:
def
check_and_update_config
(
cls
,
vllm_config
:
"
VllmConfig
"
)
->
None
:
parallel_config
=
vllm_config
.
parallel_config
scheduler_config
=
vllm_config
.
scheduler_config
compilation_config
=
vllm_config
.
compilation_config
...
...
@@ -308,7 +305,7 @@ class CudaPlatformBase(Platform):
return
cls
.
has_device_capability
(
89
)
@
classmethod
def
supports_v1
(
cls
,
model_config
:
ModelConfig
)
->
bool
:
def
supports_v1
(
cls
,
model_config
:
"
ModelConfig
"
)
->
bool
:
return
True
@
classmethod
...
...
vllm/platforms/rocm.py
View file @
30215ca6
...
...
@@ -13,9 +13,6 @@ from .interface import DeviceCapability, Platform, PlatformEnum, _Backend
if
TYPE_CHECKING
:
from
vllm.config
import
ModelConfig
,
VllmConfig
else
:
ModelConfig
=
None
VllmConfig
=
None
logger
=
init_logger
(
__name__
)
...
...
@@ -243,7 +240,7 @@ class RocmPlatform(Platform):
return
True
@
classmethod
def
check_and_update_config
(
cls
,
vllm_config
:
VllmConfig
)
->
None
:
def
check_and_update_config
(
cls
,
vllm_config
:
"
VllmConfig
"
)
->
None
:
cache_config
=
vllm_config
.
cache_config
if
cache_config
and
cache_config
.
block_size
is
None
:
cache_config
.
block_size
=
16
...
...
@@ -332,7 +329,7 @@ class RocmPlatform(Platform):
return
torch
.
float8_e4m3fn
@
classmethod
def
supports_v1
(
cls
,
model_config
:
ModelConfig
)
->
bool
:
def
supports_v1
(
cls
,
model_config
:
"
ModelConfig
"
)
->
bool
:
# V1 support on AMD gpus is experimental
return
True
...
...
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