[GH-ISSUE #93] CPU-only configure: missing tests/ directory and dequant_bf16_test linking cudart outside the CUDA guard #51

Closed
opened 2026-11-04 01:39:19 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Avicennasis on GitHub (Sep 28, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/93

Two things a CPU-only configure trips over on main (c1e9033, 0.1.20), found while building the tests for the GGUF reader and shard-check PRs. Neither is touched by those PRs.

  1. The published tree has no tests/ directory, but the top-level CMakeLists.txt adds it, so cmake -B build -DSTRATA_ENABLE_CUDA=OFF -DSTRATA_BUILD_TESTS=ON fails at configure until an empty tests/CMakeLists.txt is dropped in. Either the directory is missing from the repository or the add_subdirectory should be guarded on its existence.

  2. dequant_bf16_test links CUDA::cudart outside the CUDA guard (around CMakeLists.txt:574-575), so with STRATA_ENABLE_CUDA=OFF configure fails on the missing imported target; with a stub target injected the build then fails on cuda_runtime.h. The target should sit inside the STRATA_ENABLE_CUDA block (it is not a ctest, so nothing else moves).

With both worked around locally, the CPU build produces 9 ctests; 8 pass on a Ryzen 7 5800X and expert_multi_test refuses with the kernel's own AVX-512 check, which is correct for that CPU. Happy to send the two-line fix if you want it as a PR.

Originally created by @Avicennasis on GitHub (Sep 28, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/93 Two things a CPU-only configure trips over on `main` (`c1e9033`, 0.1.20), found while building the tests for the GGUF reader and shard-check PRs. Neither is touched by those PRs. 1. **The published tree has no `tests/` directory**, but the top-level `CMakeLists.txt` adds it, so `cmake -B build -DSTRATA_ENABLE_CUDA=OFF -DSTRATA_BUILD_TESTS=ON` fails at configure until an empty `tests/CMakeLists.txt` is dropped in. Either the directory is missing from the repository or the `add_subdirectory` should be guarded on its existence. 2. **`dequant_bf16_test` links `CUDA::cudart` outside the CUDA guard** (around `CMakeLists.txt:574-575`), so with `STRATA_ENABLE_CUDA=OFF` configure fails on the missing imported target; with a stub target injected the build then fails on `cuda_runtime.h`. The target should sit inside the `STRATA_ENABLE_CUDA` block (it is not a ctest, so nothing else moves). With both worked around locally, the CPU build produces 9 ctests; 8 pass on a Ryzen 7 5800X and `expert_multi_test` refuses with the kernel's own AVX-512 check, which is correct for that CPU. Happy to send the two-line fix if you want it as a PR.
Author
Owner

@Niko1221 commented on GitHub (Sep 29, 2026):

Fixed in 0.1.23: dequant_bf16_test is only built with CUDA, so a CPU-only configure with the tests works. Thanks @Avicennasis!

<!-- gh-comment-id:5889681302 --> @Niko1221 commented on GitHub (Sep 29, 2026): Fixed in 0.1.23: `dequant_bf16_test` is only built with CUDA, so a CPU-only configure with the tests works. Thanks @Avicennasis!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#51
No description provided.