[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:
Shengqi Chen
2026-04-08 09:55:24 -07:00
committed by GitHub
co-authored by Jason Li Roger Wang
parent 512c5eb455
commit 75e01a39a1
13 changed files with 817 additions and 7 deletions
+9 -1
View File
@@ -44,6 +44,7 @@ from vllm.envs import enable_envs_cache
from vllm.logger import init_logger
from vllm.platforms import current_platform
from vllm.tracing import instrument, maybe_init_worker_tracer
from vllm.utils import numa_utils
from vllm.utils.network_utils import (
get_distributed_init_method,
get_ip,
@@ -688,7 +689,12 @@ class WorkerProc:
daemon=True,
)
proc.start()
# Apply NUMA binding if configured
with numa_utils.configure_subprocess(
vllm_config, local_rank, process_kind="worker"
):
proc.start()
# Close child ends of pipes here in the parent
ready_writer.close()
death_reader.close()
@@ -839,6 +845,8 @@ class WorkerProc:
worker = WorkerProc(*args, **kwargs)
assert worker.worker_response_mq is not None
if kwargs["vllm_config"].parallel_config.numa_bind:
numa_utils.log_current_affinity_state(f"Worker_{worker.rank}")
worker.monitor_death_pipe(death_pipe, shutdown_requested)