[Bug]: CMake: four native-expert tests are registered only from the second configure (STRATA_NATIVE_EXPERTS is read before its option())
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 83/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- cmake, cpp
- Domain
- build-system, testing
Research direction
In CMakeLists.txt, STRATA_NATIVE_EXPERTS is read near line 538 before its option() declaration near line 1210. Read the options section and the GPU test registration block, then configure once with CUDA and tests enabled and compare the registered test count. Move the option declaration before its first use; done means all four native expert tests are registered on the first configure.
Written by the indexing model from the issue text.
Description
What happened
In a GPU build, CMakeLists.txt reads STRATA_NATIVE_EXPERTS at line 538 (if(STRATA_BUILD_TESTS AND STRATA_NATIVE_EXPERTS), inside the if(STRATA_ENABLE_CUDA OR STRATA_ENABLE_HIP) block from line 292) before option(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. The option() 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_test and expert_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):
cmake -S . -B build -DSTRATA_ENABLE_CUDA=ON -DSTRATA_BUILD_TESTS=ON -DCMAKE_CUDA_ARCHITECTURES=120
ctest --test-dir build -N | tail -1 # Total Tests: 109
cmake -S . -B build
ctest --test-dir build -N | tail -1 # Total Tests: 113
(I also passed -DSTRATA_GGML_DIR pointing 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 other option()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.
- Dominant language
- C++
- Stars
- 11.6k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Niko1221/Strata
-
[Linux] --calibrate combined with --model silently falls through to plain re-setup (setup.py:4958)Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
[Feature]: Log authentication failures with the client source IP (for fail2ban / rate limiting)Open
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
AcademySoftwareFoundation/Imath#611 ·
Maintainers usually reply within 1 day
-
bug intrinsic low priority rt_lib
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
The Outdated Version prompt shows the release tag as unescaped HTMLPossibly taken @on8st claimed this today. Openbug good first issue GUI maintainer-review priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
aethersdr/AetherSDR#6405 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
bitcoin-core/gui-qml#1003 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100