fix: fix gpu-proc affinity set incorrectly when pp_size > 1 (#11389)

This commit is contained in:
Yingchun Lai
2025-10-10 09:40:05 +08:00
committed by GitHub
parent 1f106ee365
commit 0fe87213bb
3 changed files with 9 additions and 3 deletions

View File

@@ -2921,7 +2921,9 @@ def run_scheduler_process(
# Set cpu affinity to this gpu process
if get_bool_env_var("SGLANG_SET_CPU_AFFINITY"):
set_gpu_proc_affinity(server_args.tp_size, server_args.nnodes, gpu_id)
set_gpu_proc_affinity(
server_args.pp_size, server_args.tp_size, server_args.nnodes, gpu_id
)
if (numa_node := server_args.numa_node) is not None:
numa_bind_to_node(numa_node[gpu_id])