62 build times are too high for test saturate - #63
Conversation
1c35773 to
fcc9b3e
Compare
e575794 to
8d4c05e
Compare
bcd8d42 to
1b1e015
Compare
9d4b296 to
cb2f643
Compare
8760a74 to
96b9dce
Compare
…t needed for the use case that still depends on this library
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the test build system to reduce compilation times by distributing template-heavy test code across separate compilation units that can be built in parallel. The changes split monolithic header-only test files into generated per-type templates using CMake's configure_file mechanism.
- Introduces template-based code generation for individual fundamental types (char, int, float, etc.)
- Replaces header-only test implementations with shared library builds for better parallelization
- Adds comprehensive build system support including Windows export headers and cross-platform compiler warnings
Reviewed Changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| utests/core/utils/utest_cuda_vector_utils/*.in | Template files for generating per-type test compilation units |
| utests/algorithm/image_processing/utest_saturate/*.in | Template files for saturate test per-type compilation units |
| cmake/tests/*.cmake | Build system support for shared test libraries and export headers |
| utests/CMakeLists.txt | Updated to use new shared library test approach |
| CMakeLists.txt | Added export header support and test build options |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
morousg
left a comment
There was a problem hiding this comment.
I reinstalled VS2022 Community, version 17.14.13, installed CUDA 12.9, using cmake 3.31.5, and I keep getting this project folder structure. I understand that we should see a folder tests and another folder utests, without the FKL "pre-folder".
Maybe it is related to the way the project was cloned? I cloned the repo with source tree, into a folder named FKL.
Please, try to reproduce the issue and fix it. In the mean time, I'm going to chage a few things in how the code is distributed.
# Conflicts: # .github/workflows/cmake-linux-arm64.yml # CMakeLists.txt # cmake/tests/add_generated_test.cmake
reducing build times by distributing template compilation across separate compilation units
This PR distributes template compilation across separate compilation units to reduce build times for test saturation. The refactoring splits monolithic header-only test files into generated per-type templates that can be compiled in parallel.
Introduces template-based code generation for test compilation units using CMake configure_file
Replaces header-only implementations with shared library builds for better parallelization
Adds build system support for Windows export headers and cross-platform compiler warning suppression
Reviewed Changes