mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #2027] [Bug]: CMake: four native-expert tests are registered only from the second configure (STRATA_NATIVE_EXPERTS is read before its option()) #805
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#805
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @KarlGrier on GitHub (Oct 12, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2027
What happened
In a GPU build,
CMakeLists.txtreadsSTRATA_NATIVE_EXPERTSat line 538 (if(STRATA_BUILD_TESTS AND STRATA_NATIVE_EXPERTS), inside theif(STRATA_ENABLE_CUDA OR STRATA_ENABLE_HIP)block from line 292) beforeoption(STRATA_NATIVE_EXPERTS "Native (IQ) expert support through ggml-cpu" ON)defines it at line 1210 (v0.1.43,7695859a). On a fresh build directory the variable is still unset at line 538, so that block registers nothing. Theoption()then writes it to the cache, and only the next configure registers the four tests:expert_layout_test,native_dense_ple_key_test,expert_cache_per_layer_testandexpert_cache_segmented_test. A build directory configured once (as in CI or a first build) runs four tests fewer than one configured twice.Steps (configure only, nothing built):
(I also passed
-DSTRATA_GGML_DIRpointing at a llama.cpp checkout and-DCMAKE_CUDA_COMPILER.) A CPU-only configure is not affected: it registers 39 tests both times, since the block is in the GPU section. v0.1.42 had it at lines 538 / 1199 (108 → 112) and v0.1.41 at 488 / 1131 (95 → 99); the four passed there once registered.Suggested fix: move
option(STRATA_NATIVE_EXPERTS ...)from line 1210 up to the otheroption()s (lines 14–101), so it is defined before line 538 reads it.Not tested: HIP builds (the same block), other CMake versions.
Strata version, GPU, OS
v0.1.43 (
7695859a) source, CMake 3.28.3, CUDA 13.3 · configure only, so the GPU does not matter (RTX 5080 + RTX 4060 Ti here) · Linux 7.0 (Ubuntu 24.04-based)Engine log
Not applicable (configure time).
Measured and drafted with Claude Code.
@Niko1221 commented on GitHub (Oct 12, 2026):
Confirmed by reading the file: line 538 reads
STRATA_NATIVE_EXPERTSbefore theoption()at line 1210 defines it, so a fresh build directory registers four tests fewer than the second configure. Fixed as you suggested: theoption(STRATA_NATIVE_EXPERTS ...)now sits with the other options near the top, ahead of the GPU section, and the old line is removed (the default stays ON, and-DSTRATA_NATIVE_EXPERTS=OFFstill works becauseoption()keeps a value given on the command line). I could not run a CUDA configure on this machine, so a first configure should now showTotal Tests: 113; if it does not on your side, please tell us. Closing when the fix ships in 0.1.43.1 (out now).@KarlGrier commented on GitHub (Oct 13, 2026):
Checked on v0.1.43.1 (
a0116b27): a fresh build directory with CUDA and tests on showsTotal Tests: 113on the first configure. Thanks for the quick fix.Measured and drafted with Claude Code.