mirror of
https://github.com/kvcache-ai/sglang.git
synced 2026-11-05 01:07:39 +00:00
[PR #28] [feat]: add --kt-numa-nodes for explicit NUMA node mapping #27
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/sglang#27
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/kvcache-ai/sglang/pull/28
Author: @ErvinXie
Created: 3/18/2026
Status: 🔄 Open
Base:
main← Head:feat/kt-numa-nodes📝 Commits (1)
1b4478aadd --kt-numa-nodes CLI parameter for explicit NUMA node mapping📊 Changes
2 files changed (+13 additions, -0 deletions)
View changed files
📝
python/sglang/srt/layers/moe/kt_ep_wrapper.py(+3 -0)📝
python/sglang/srt/server_args.py(+10 -0)📄 Description
Summary
--kt-numa-nodesCLI parameter toServerArgsfor specifying NUMA node IDsnuma_nodesthroughKTConfigdataclass toKTMoEWrapperinstantiation"1"or"0,1") intoList[int]Motivation
Companion to kvcache-ai/ktransformers#1891.
Currently
subpool_numa_mapin kt-kernel defaults to[0, 1, ..., threadpool_count-1]. This makes it impossible to bind a KTransformers instance to a specific NUMA node (e.g., node 1) without externalnumactl.Usage
Deploy two independent instances on a dual-NUMA machine, each bound to a different NUMA node:
You can also specify multiple NUMA nodes in custom order:
If
--kt-numa-nodesis not specified, the behavior is unchanged.Tested on
CPUInfercreates worker pool on correct NUMA nodeTest plan
from sglang.srt.server_args import ServerArgsimports successfully--kt-numa-nodesis accepted by argparse and parsed correctly--kt-numa-nodesbehaves as before🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.