[CPU][UX] Do not crash when tcmalloc/libiomp are not ldpreloaded (#37561)

Signed-off-by: Fadi Arafeh <fadi.arafeh@arm.com>
This commit is contained in:
Fadi Arafeh
2026-03-19 16:35:45 +00:00
committed by GitHub
parent 34f093b417
commit 2890aecce5

View File

@@ -57,11 +57,13 @@ class CPUWorker(Worker):
def check_preloaded_libs(name: str):
ld_preload_list = os.environ.get("LD_PRELOAD", "")
if name not in ld_preload_list:
raise RuntimeError(
f"{name} is not found in LD_PRELOAD. "
"Please follow the section `set LD_PRELOAD` in "
logger.warning(
"%s is not found in LD_PRELOAD. "
"For best performance, please follow the section "
"`set LD_PRELOAD` in "
"https://docs.vllm.ai/en/latest/getting_started/installation/cpu/ "
"to setup required pre-loaded libraries."
"to setup required pre-loaded libraries.",
name,
)
if sys.platform.startswith("linux"):