summaryrefslogtreecommitdiff
path: root/ggml/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'ggml/CMakeLists.txt')
-rw-r--r--ggml/CMakeLists.txt12
1 files changed, 10 insertions, 2 deletions
diff --git a/ggml/CMakeLists.txt b/ggml/CMakeLists.txt
index 66505753..1bb3d1ee 100644
--- a/ggml/CMakeLists.txt
+++ b/ggml/CMakeLists.txt
@@ -50,9 +50,15 @@ else()
set(GGML_BLAS_VENDOR_DEFAULT "Generic")
endif()
+if (CMAKE_CROSSCOMPILING)
+ set(GGML_NATIVE_DEFAULT OFF)
+else()
+ set(GGML_NATIVE_DEFAULT ON)
+endif()
+
# general
option(GGML_STATIC "ggml: static link libraries" OFF)
-option(GGML_NATIVE "ggml: enable -march=native flag" ON)
+option(GGML_NATIVE "ggml: enable -march=native flag" ${GGML_NATIVE_DEFAULT})
option(GGML_LTO "ggml: enable link time optimization" OFF)
option(GGML_CCACHE "ggml: use ccache if available" ON)
@@ -70,7 +76,7 @@ option(GGML_SANITIZE_ADDRESS "ggml: enable address sanitizer" OFF)
option(GGML_SANITIZE_UNDEFINED "ggml: enable undefined sanitizer" OFF)
# instruction set specific
-if (GGML_NATIVE)
+if (GGML_NATIVE OR NOT GGML_NATIVE_DEFAULT)
set(INS_ENB OFF)
else()
set(INS_ENB ON)
@@ -108,6 +114,7 @@ option(GGML_LLAMAFILE "ggml: use LLAMAFILE"
option(GGML_IQK_MUL_MAT "ggml: use optimized iqk matrix multiplications" ON)
option(GGML_CUDA "ggml: use CUDA" OFF)
+option(GGML_MUSA "ggml: use MUSA" OFF)
option(GGML_CUDA_FORCE_DMMV "ggml: use dmmv instead of mmvq CUDA kernels" OFF)
option(GGML_CUDA_FORCE_MMQ "ggml: use mmq kernels instead of cuBLAS" OFF)
option(GGML_CUDA_FORCE_CUBLAS "ggml: always use cuBLAS instead of mmq kernels" OFF)
@@ -197,6 +204,7 @@ set(GGML_PUBLIC_HEADERS
include/ggml-alloc.h
include/ggml-backend.h
include/ggml-blas.h
+ include/ggml-cann.h
include/ggml-cuda.h
include/ggml.h
include/ggml-kompute.h