[CPU] Explicitly enable AVX512 & AMX instruction set (#26145)

Co-authored-by: Ma Mingfei <mingfei.ma@intel.com>
This commit is contained in:
Zaili Wang
2026-06-03 13:40:41 +08:00
committed by GitHub
co-authored by Ma Mingfei
parent aa510bda45
commit 512bfbb1e1
+20 -6
View File
@@ -115,12 +115,26 @@ if("$ENV{SGLANG_CPU_FP8_CVT_FTZ}" STREQUAL "1")
add_compile_definitions(SGLANG_CPU_FP8_CVT_FTZ)
endif()
add_compile_options(
-O3
-Wno-unknown-pragmas
-march=native
-fopenmp
)
if(MY_ARCH_DIR STREQUAL "x86_64")
add_compile_options(
-O3
-Wno-unknown-pragmas
-march=x86-64-v4
-mavx512bf16
-mavx512vnni
-mamx-tile
-mamx-bf16
-mamx-int8
-fopenmp
)
else()
add_compile_options(
-O3
-Wno-unknown-pragmas
-march=native
-fopenmp
)
endif()
Python_add_library(common_ops MODULE USE_SABI ${SKBUILD_SABI_VERSION} WITH_SOABI ${SOURCES})
target_link_libraries(common_ops PRIVATE ${TORCH_LIBRARIES} ${NUMA_LIB})