mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-26 13:56:32 +08:00
[hardware][rocm] allow rocm to override default env var (#7926)
This commit is contained in:
parent
fab5f53e2d
commit
bc6e42a9b1
@ -1088,8 +1088,9 @@ class Scheduler:
|
||||
)
|
||||
|
||||
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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user