[Bugfix] Force using spawn multiprocess method when it's the WSL platform (#32749)

Signed-off-by: Yanwen Lin <lyw1124278064@gmail.com>
This commit is contained in:
Yanwen Lin
2026-01-21 01:35:55 -08:00
committed by GitHub
parent c80f92c14d
commit 6bb2bc71e2

View File

@@ -16,6 +16,7 @@ import psutil
import vllm.envs as envs
from vllm.logger import init_logger
from vllm.platforms.interface import in_wsl
from vllm.ray.lazy_utils import is_in_ray_actor
from .platform_utils import cuda_is_initialized, xpu_is_initialized
@@ -132,6 +133,9 @@ def _maybe_force_spawn():
elif xpu_is_initialized():
reasons.append("XPU is initialized")
if in_wsl():
reasons.append("WSL is detected and NVML is not compatible with fork")
if reasons:
logger.warning(
"We must use the `spawn` multiprocessing start method. "