[Bugfix][CPU] Fall back to CpuPlatform when zentorch fails to import (#54923)

Signed-off-by: R <Ganesh.R@amd.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ganesh R
2026-09-16 17:15:12 +08:00
committed by GitHub
co-authored by Cursor
parent 03f67b3ad1
commit 82731931ae
2 changed files with 59 additions and 2 deletions
+9
View File
@@ -217,6 +217,15 @@ def cpu_platform_plugin() -> str | None:
"AMD Zen CPU detected but zentorch not installed, "
"falling back to CpuPlatform."
)
except OSError:
# An ABI-mismatched build fails here with an undefined-symbol
# error; other failures are not known to be safe to recover from.
logger.warning(
"AMD Zen CPU detected but zentorch failed to import, falling "
"back to CpuPlatform. This usually means the zentorch build "
"does not match the installed torch version.",
exc_info=True,
)
return "vllm.platforms.cpu.CpuPlatform"