[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:
@@ -16,6 +16,7 @@ import psutil
|
|||||||
|
|
||||||
import vllm.envs as envs
|
import vllm.envs as envs
|
||||||
from vllm.logger import init_logger
|
from vllm.logger import init_logger
|
||||||
|
from vllm.platforms.interface import in_wsl
|
||||||
from vllm.ray.lazy_utils import is_in_ray_actor
|
from vllm.ray.lazy_utils import is_in_ray_actor
|
||||||
|
|
||||||
from .platform_utils import cuda_is_initialized, xpu_is_initialized
|
from .platform_utils import cuda_is_initialized, xpu_is_initialized
|
||||||
@@ -132,6 +133,9 @@ def _maybe_force_spawn():
|
|||||||
elif xpu_is_initialized():
|
elif xpu_is_initialized():
|
||||||
reasons.append("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:
|
if reasons:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
"We must use the `spawn` multiprocessing start method. "
|
"We must use the `spawn` multiprocessing start method. "
|
||||||
|
|||||||
Reference in New Issue
Block a user