diff --git a/vllm/core/scheduler.py b/vllm/core/scheduler.py index de1988eead97b..a4a4285cdf3a2 100644 --- a/vllm/core/scheduler.py +++ b/vllm/core/scheduler.py @@ -1088,8 +1088,9 @@ def _can_append_slots(self, seq_group: SequenceGroup) -> bool: ) def _allow_async_output_proc(self, seq_group: SequenceGroup) -> bool: - no_beam_search = (seq_group.sampling_params.best_of == 1 - and not seq_group.sampling_params.use_beam_search) + no_beam_search = seq_group.sampling_params is None or ( + seq_group.sampling_params.best_of == 1 + and not seq_group.sampling_params.use_beam_search) return no_beam_search diff --git a/vllm/platforms/rocm.py b/vllm/platforms/rocm.py index 3f6f5adee5a56..28525e8ff8811 100644 --- a/vllm/platforms/rocm.py +++ b/vllm/platforms/rocm.py @@ -1,10 +1,21 @@ +import os from functools import lru_cache from typing import Tuple import torch +from vllm.logger import init_logger + from .interface import Platform, PlatformEnum +logger = init_logger(__name__) + +if os.environ.get("VLLM_WORKER_MULTIPROC_METHOD", None) in ["fork", None]: + logger.warning("`fork` method is not supported by ROCm. " + "VLLM_WORKER_MULTIPROC_METHOD is overridden to" + " `spawn` instead.") + os.environ["VLLM_WORKER_MULTIPROC_METHOD"] = "spawn" + class RocmPlatform(Platform): _enum = PlatformEnum.ROCM