From f42e94a527b6e6b9f06aa74bf070570e74da31c7 Mon Sep 17 00:00:00 2001 From: Andy18650 <57994706+Andy18650@users.noreply.github.com> Date: Mon, 13 Apr 2026 16:45:41 +0800 Subject: [PATCH] [fix](cli): handle edge cases with empty NUMA nodes (#1929) Co-authored-by: Andy18650 <114562805@qq.com> --- kt-kernel/python/cli/utils/environment.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kt-kernel/python/cli/utils/environment.py b/kt-kernel/python/cli/utils/environment.py index 422c6dca..b70525ea 100644 --- a/kt-kernel/python/cli/utils/environment.py +++ b/kt-kernel/python/cli/utils/environment.py @@ -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("-")