@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / f7ee69868a
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 14, 05:30 UTC

[CPU] fix the issue when the node is '-' cause json decode error. (#26562)

Signed-off-by: muzian666 <andylee_2001@163.com> Co-authored-by: qingan.li <qingan.li@wizpresso.com>

muzian666 committed Oct 11, 2025 at 20:04 UTC f7ee69868a26a7f1ce3e3c0086b6bcbee266e204
1 file changed +2
vllm/platforms/cpu.py
+2
@@ -4,6 +4,7 @@
4 import json
5 import os
6 import platform
7 +import re
8 import subprocess
9 import sys
10 from dataclasses import dataclass
@@ -336,6 +337,7 @@ class CpuPlatform(Platform):
337 lscpu_output = subprocess.check_output(
338 "lscpu -J -e=CPU,CORE,NODE", shell=True, text=True
339 )
340 + lscpu_output = re.sub(r'"node":\s*-\s*(,|\n)', r'"node": 0\1', lscpu_output)
341 logical_cpu_list: list[LogicalCPUInfo] = json.loads(
342 lscpu_output, object_hook=LogicalCPUInfo.json_decoder
343 )["cpus"]