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

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

[CPU][Spec Decode] Warn about throughput loss when libiomp5 is not preloaded (#44419)

Signed-off-by: jmamou <jonathan.mamou@intel.com> Signed-off-by: Jonathan Mamou <jonathan.mamou@intel.com> Co-authored-by: Li, Jiang <bigpyj64@gmail.com> Co-authored-by: Li, Jiang <jiang1.li@intel.com>

Jonathan Mamou committed Jun 8, 2026 at 13:45 UTC d5fe994e79104a6d38b71b73a55a66476a5e0908
1 file changed +13 -2
vllm/v1/worker/cpu_worker.py
+13 -2
@@ -108,7 +108,7 @@ class CPUWorker(Worker):
108 self.device = torch.device("cpu")
109
110 # Check whether critical libraries are loaded
111 - def check_preloaded_libs(name: str):
111 + def check_preloaded_libs(name: str) -> bool:
112 ld_preload_list = os.environ.get("LD_PRELOAD", "")
113 if name not in ld_preload_list:
114 logger.warning(
@@ -119,11 +119,22 @@ class CPUWorker(Worker):
119 "to setup required pre-loaded libraries.",
120 name,
121 )
122 + return False
123 + return True
124
125 if sys.platform.startswith("linux"):
126 check_preloaded_libs("libtcmalloc")
127 if current_platform.get_cpu_architecture() == CpuArchEnum.X86:
126 - check_preloaded_libs("libiomp")
128 + iomp_loaded = check_preloaded_libs("libiomp")
129 + if not iomp_loaded and self.vllm_config.speculative_config is not None:
130 + logger.warning(
131 + "Speculative decoding on CPU without Intel OpenMP in "
132 + "LD_PRELOAD will cause significant performance loss. "
133 + "Please follow the section `set LD_PRELOAD` in "
134 + "https://docs.vllm.ai/en/latest/getting_started/"
135 + "installation/cpu/ "
136 + "to setup libiomp5.",
137 + )
138
139 def skip_set_num_threads(x: int):
140 logger.warning(