mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2026-04-28 11:49:51 +00:00
[fix](cli): handle edge cases with empty NUMA nodes (#1929)
Co-authored-by: Andy18650 <114562805@qq.com>
This commit is contained in:
parent
279c920a69
commit
f42e94a527
1 changed files with 3 additions and 0 deletions
|
|
@ -446,6 +446,9 @@ def _parse_cpu_flags(flags: list[str]) -> list[str]:
|
|||
def _parse_cpu_list(cpulist: str) -> list[int]:
|
||||
"""Parse CPU list string like '0-3,8-11' to list of CPU IDs."""
|
||||
cpus = []
|
||||
if cpulist == "":
|
||||
# if there are no cpu cores for a specific numa node (for example, virtual numa on optane), return empty list
|
||||
return cpus
|
||||
for part in cpulist.split(","):
|
||||
if "-" in part:
|
||||
start, end = part.split("-")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue