[CPU] Explicitly enable AVX512 & AMX instruction set (#26145)
Co-authored-by: Ma Mingfei <mingfei.ma@intel.com>
This commit is contained in:
Executable → Regular
+20
-6
@@ -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})
|
||||
|
||||
Reference in New Issue
Block a user