Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions vllm/platforms/cuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@

if TYPE_CHECKING:
from vllm.config import ModelConfig, VllmConfig
else:
ModelConfig = None
VllmConfig = None

logger = init_logger(__name__)

Expand Down Expand Up @@ -109,7 +106,7 @@ def log_warnings(cls):
pass

@classmethod
def check_and_update_config(cls, vllm_config: VllmConfig) -> None:
def check_and_update_config(cls, vllm_config: "VllmConfig") -> None:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can make it with from __future__ import annotations, it will automatically convert all annotations to string.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think either way is fine.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wfm

parallel_config = vllm_config.parallel_config
scheduler_config = vllm_config.scheduler_config
compilation_config = vllm_config.compilation_config
Expand Down Expand Up @@ -308,7 +305,7 @@ def supports_fp8(cls) -> bool:
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
Expand Down
7 changes: 2 additions & 5 deletions vllm/platforms/rocm.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@

if TYPE_CHECKING:
from vllm.config import ModelConfig, VllmConfig
else:
ModelConfig = None
VllmConfig = None

logger = init_logger(__name__)

Expand Down Expand Up @@ -243,7 +240,7 @@ def is_async_output_supported(cls, enforce_eager: Optional[bool]) -> bool:
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
Expand Down Expand Up @@ -332,7 +329,7 @@ def fp8_dtype(cls) -> torch.dtype:
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

Expand Down