diff options
-rw-r--r-- | ggml/CMakeLists.txt | 1 | ||||
-rw-r--r-- | ggml/src/CMakeLists.txt | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/ggml/CMakeLists.txt b/ggml/CMakeLists.txt index 4dbd8d34..e63520f0 100644 --- a/ggml/CMakeLists.txt +++ b/ggml/CMakeLists.txt @@ -104,6 +104,7 @@ endif() # ggml core set(GGML_SCHED_MAX_COPIES "4" CACHE STRING "ggml: max input copies for pipeline parallelism") +set(GGML_MAX_CONTEXTS "" CACHE STRING "ggml: max model contexts (override only; defaults to 64 in the code)") # 3rd party libs / backends option(GGML_ACCELERATE "ggml: enable Accelerate framework" ON) diff --git a/ggml/src/CMakeLists.txt b/ggml/src/CMakeLists.txt index 1a3c1ff6..175f9c67 100644 --- a/ggml/src/CMakeLists.txt +++ b/ggml/src/CMakeLists.txt @@ -3,6 +3,9 @@ include(CheckCXXCompilerFlag) unset(GGML_CDEF_PUBLIC) add_compile_definitions(GGML_SCHED_MAX_COPIES=${GGML_SCHED_MAX_COPIES}) +if (GGML_MAX_CONTEXTS) + add_compile_definitions(GGML_MAX_CONTEXTS=${GGML_MAX_CONTEXTS}) +endif() # enable libstdc++ assertions for debug builds if (CMAKE_SYSTEM_NAME MATCHES "Linux") |