Merge 2659a180ee
into bb0c139247
This commit is contained in:
commit
fb5398c8aa
1 changed files with 9 additions and 1 deletions
|
@ -71,6 +71,7 @@ option(LLAMA_AVX512 "llama: enable AVX512"
|
||||||
option(LLAMA_AVX512_VBMI "llama: enable AVX512-VBMI" OFF)
|
option(LLAMA_AVX512_VBMI "llama: enable AVX512-VBMI" OFF)
|
||||||
option(LLAMA_AVX512_VNNI "llama: enable AVX512-VNNI" OFF)
|
option(LLAMA_AVX512_VNNI "llama: enable AVX512-VNNI" OFF)
|
||||||
option(LLAMA_FMA "llama: enable FMA" ${INS_ENB})
|
option(LLAMA_FMA "llama: enable FMA" ${INS_ENB})
|
||||||
|
option(LLAMA_AMX "llama: enable AMX" OFF)
|
||||||
# in MSVC F16C is implied with AVX2/AVX512
|
# in MSVC F16C is implied with AVX2/AVX512
|
||||||
if (NOT MSVC)
|
if (NOT MSVC)
|
||||||
option(LLAMA_F16C "llama: enable F16C" ${INS_ENB})
|
option(LLAMA_F16C "llama: enable F16C" ${INS_ENB})
|
||||||
|
@ -627,7 +628,7 @@ elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "^(x86_64|i686|AMD64)$" OR "${CMAKE_GE
|
||||||
if (LLAMA_NATIVE)
|
if (LLAMA_NATIVE)
|
||||||
include(cmake/FindSIMD.cmake)
|
include(cmake/FindSIMD.cmake)
|
||||||
endif ()
|
endif ()
|
||||||
if (LLAMA_AVX512)
|
if (LLAMA_AVX512 OR LLAMA_AMX)
|
||||||
add_compile_options($<$<COMPILE_LANGUAGE:C>:/arch:AVX512>)
|
add_compile_options($<$<COMPILE_LANGUAGE:C>:/arch:AVX512>)
|
||||||
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:/arch:AVX512>)
|
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:/arch:AVX512>)
|
||||||
# MSVC has no compile-time flags enabling specific
|
# MSVC has no compile-time flags enabling specific
|
||||||
|
@ -675,6 +676,13 @@ elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "^(x86_64|i686|AMD64)$" OR "${CMAKE_GE
|
||||||
if (LLAMA_AVX512_VNNI)
|
if (LLAMA_AVX512_VNNI)
|
||||||
add_compile_options(-mavx512vnni)
|
add_compile_options(-mavx512vnni)
|
||||||
endif()
|
endif()
|
||||||
|
if (LLAMA_AMX)
|
||||||
|
add_compile_options(-mavx512vl)
|
||||||
|
add_compile_options(-mavx512dq)
|
||||||
|
add_compile_options(-mamx-tile)
|
||||||
|
add_compile_options(-mamx-int8)
|
||||||
|
add_compile_options(-mamx-bf16)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc64")
|
elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc64")
|
||||||
message(STATUS "PowerPC detected")
|
message(STATUS "PowerPC detected")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue