diff --git a/vllm/utils/system_utils.py b/vllm/utils/system_utils.py index aa14b3951..98632c542 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. "