[Feature] NUMA binding support for GPU workers (#38635)
Signed-off-by: Shengqi Chen <harry-chen@outlook.com> Co-authored-by: Jason Li <jasonlizhengjian@gmail.com> Co-authored-by: Roger Wang <hey@rogerw.io>
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
|
||||
import os
|
||||
import tempfile
|
||||
from pathlib import Path
|
||||
|
||||
from vllm.utils.system_utils import unique_filepath
|
||||
from vllm.utils.system_utils import _maybe_force_spawn, unique_filepath
|
||||
|
||||
|
||||
def test_unique_filepath():
|
||||
@@ -17,3 +18,10 @@ def test_unique_filepath():
|
||||
paths.add(path)
|
||||
assert len(paths) == 10
|
||||
assert len(list(Path(temp_dir).glob("*.txt"))) == 10
|
||||
|
||||
|
||||
def test_numa_bind_forces_spawn(monkeypatch):
|
||||
monkeypatch.delenv("VLLM_WORKER_MULTIPROC_METHOD", raising=False)
|
||||
monkeypatch.setattr("sys.argv", ["vllm", "serve", "--numa-bind"])
|
||||
_maybe_force_spawn()
|
||||
assert os.environ["VLLM_WORKER_MULTIPROC_METHOD"] == "spawn"
|
||||
|
||||
Reference in New Issue
Block a user