[CPU] Fix macOS/Apple Silicon hang by enabling OpenMP in the build (#46769)

Signed-off-by: mgoin <mgoin64@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Michael Goin
2026-06-26 14:32:21 -04:00
committed by GitHub
co-authored by Claude Opus 4.8
parent 3d3b96488f
commit c6554f321c
10 changed files with 49 additions and 15 deletions
+3
View File
@@ -24,7 +24,10 @@ set (ENABLE_NUMA TRUE)
# Check the compile flags
#
if(MACOSX_FOUND)
# Apple clang needs -Xpreprocessor to enable OpenMP. No runtime link is
# needed: _C is a dynamic_lookup bundle and resolves libomp from torch.
list(APPEND CXX_COMPILE_FLAGS
"-Xpreprocessor" "-fopenmp"
"-DVLLM_CPU_EXTENSION")
else()
list(APPEND CXX_COMPILE_FLAGS