From 6bb2bc71e299c2f0d9ecb1fcebe54aa64e658307 Mon Sep 17 00:00:00 2001 From: Yanwen Lin Date: Wed, 21 Jan 2026 01:35:55 -0800 Subject: [PATCH] [Bugfix] Force using spawn multiprocess method when it's the WSL platform (#32749) Signed-off-by: Yanwen Lin --- vllm/utils/system_utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vllm/utils/system_utils.py b/vllm/utils/system_utils.py index aa14b395164..98632c54292 100644 --- a/vllm/utils/system_utils.py +++ b/vllm/utils/system_utils.py @@ -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. "