diff --git a/CMakeLists.txt b/CMakeLists.txt index c0b93564a..f50ca4f78 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,15 +58,17 @@ option(LLAMA_SANITIZE_ADDRESS "llama: enable address sanitizer" option(LLAMA_SANITIZE_UNDEFINED "llama: enable undefined sanitizer" OFF) # instruction set specific -option(LLAMA_AVX "llama: enable AVX" ON) -option(LLAMA_AVX2 "llama: enable AVX2" ON) -option(LLAMA_AVX512 "llama: enable AVX512" OFF) -option(LLAMA_AVX512_VBMI "llama: enable AVX512-VBMI" OFF) -option(LLAMA_AVX512_VNNI "llama: enable AVX512-VNNI" OFF) -option(LLAMA_FMA "llama: enable FMA" ON) -# in MSVC F16C is implied with AVX2/AVX512 -if (NOT MSVC) - option(LLAMA_F16C "llama: enable F16C" ON) +if (NOT LLAMA_NATIVE) + option(LLAMA_AVX "llama: enable AVX" ON) + option(LLAMA_AVX2 "llama: enable AVX2" ON) + option(LLAMA_AVX512 "llama: enable AVX512" OFF) + option(LLAMA_AVX512_VBMI "llama: enable AVX512-VBMI" OFF) + option(LLAMA_AVX512_VNNI "llama: enable AVX512-VNNI" OFF) + option(LLAMA_FMA "llama: enable FMA" ON) + # in MSVC F16C is implied with AVX2/AVX512 + if (NOT MSVC) + option(LLAMA_F16C "llama: enable F16C" ON) + endif() endif() # 3rd party libs