CMake: STRATA_NATIVE_EXPERTS is defined with the other options, before the GPU section reads it, so the first configure registers the four native-expert tests (#2027)

This commit is contained in:
Niko1221 committed 2026-10-12 10:39:47 +02:00
1 parent 6956f6052c
commit 17d8a171da
1 file changed
+3 -1
+3 -1
View File
@@ -99,6 +99,9 @@ endif()
option(STRATA_BUILD_TESTS "Build the test suite" ${_strata_tests_default})
option(STRATA_BUILD_CONVERSATION_TESTS "Build standalone conversation cache tests" OFF)
option(STRATA_WERROR "Treat compiler warnings as errors" OFF)
# #2027: defined here, before the GPU section reads it to register the native-expert tests (it was defined at the
# native-experts section far below, so a first configure registered four tests fewer than the second)
option(STRATA_NATIVE_EXPERTS "Native (IQ) expert support through ggml-cpu" ON)
if(STRATA_BUILD_CONVERSATION_TESTS)
enable_testing()
@@ -1207,7 +1210,6 @@ target_link_libraries(strata_kernels_cpu PUBLIC Threads::Threads)
# The CPU computes a native expert with ggml-cpu's own dot products (`ggml_get_type_traits_cpu`), so an IQ
# weight means exactly what it means in llama.cpp. ggml is built static from a llama.cpp checkout: a local one
# with -DSTRATA_GGML_DIR=..., otherwise the pinned upstream commit (third_party/ggml/VERSION.txt).
option(STRATA_NATIVE_EXPERTS "Native (IQ) expert support through ggml-cpu" ON)
set(STRATA_GGML_DIR "" CACHE PATH "llama.cpp checkout to take ggml from (empty: fetch the pinned commit)")
if(STRATA_PREFILL_MMQ AND NOT STRATA_NATIVE_EXPERTS)
message(FATAL_ERROR "STRATA_PREFILL_MMQ requires STRATA_NATIVE_EXPERTS=ON for GGML sources")