Vd/build features#274
Open
DasVinch wants to merge 3 commits intoframework-devfrom
Open
Conversation
…reports + python testing suite to invoke it.
Member
Author
|
Changed my mind: added parametric macros for when there would be multiple definitions in a file. The non-parametric macro should probably just disappear for being dangerous. |
There was a problem hiding this comment.
Pull request overview
This PR updates build configuration and a CUDA-related plugin area to fix CUDA build/link issues, along with some pre-commit formatting churn. It also introduces a project-level “Coverage” build type and adds new CLI macro variants intended to avoid reliance on hard-coded farg identifiers.
Changes:
- Bump
cmake_minimum_required()to 3.17 in several subdirectories and adjust minor CMake formatting. - Add Coverage build flags/defines and global coverage link settings in the top-level build.
- Fix CUDA standalone executable linkage in
linalgebraand update CLI macro usage incublas_Coeff2Map_Loop.cto use the new*_W_ARG()macros.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/isio-tools/isio-stream-info-1line/CMakeLists.txt |
Raise minimum CMake version for the tool subproject. |
src/isio-tools/CMakeLists.txt |
Raise minimum CMake version and minor formatting cleanup. |
src/engine/libfps/fps_procinfo_macros.h |
Add CLICMD_FIELDS_*_W_ARG() macro variants (parameterized farg). |
src/cli/libmilkscript/CMakeLists.txt |
Raise minimum CMake version. |
src/cli/libmilkscript/CLIcore_utils.h |
Add CLICMD_FIELDS_*_W_ARG() macro variants (parameterized farg). |
src/cli/CLIcore/CMakeLists.txt |
Raise minimum CMake version and whitespace cleanup. |
plugins/milk-extra-src/linalgebra/GPU_SVD_computeControlMatrix.c |
Formatting cleanup (indentation / string formatting). |
plugins/milk-extra-src/linalgebra/cublas_Coeff2Map_Loop.c |
Switch CLI cmd init to CLICMD_FIELDS_DEFAULTS_W_ARG(...) and formatting cleanup. |
plugins/milk-extra-src/linalgebra/CMakeLists.txt |
Add missing CUDA runtime/BLAS/Solver link libraries for selected standalone fpsexec targets. |
CMakeLists.txt |
Add Coverage build flags and global coverage link propagation; add extra build-type logging. |
.gitignore |
Ignore Python bytecode artifacts and coverage HTML output directories. |
Comment on lines
+41
to
+47
| #define CLICMD_FIELDS_FPSPROCS_W_ARG(farg) \ | ||
| __FILE__, sizeof(farg) / sizeof(CLICMDARGDEF), farg, CLICMDFLAG_FPS | CLICMDFLAG_PROCINFO, \ | ||
| NULL, NULL, NULL | ||
| #define CLICMD_FIELDS_DEFAULTS_W_ARG(farg) \ | ||
| __FILE__, sizeof(farg) / sizeof(CLICMDARGDEF), farg, CLICMDFLAG_FPS, NULL, NULL, NULL | ||
| #define CLICMD_FIELDS_NOFPSS_W_ARG(farg) \ | ||
| __FILE__, sizeof(farg) / sizeof(CLICMDARGDEF), farg, 0, NULL, NULL, NULL |
Comment on lines
+32
to
+40
| #define CLICMD_FIELDS_FPSPROCS_W_ARG(farg) \ | ||
| __FILE__, sizeof(farg) / sizeof(CLICMDARGDEF), farg, CLICMDFLAG_FPS | CLICMDFLAG_PROCINFO, \ | ||
| NULL, NULL, NULL | ||
| #define CLICMD_FIELDS_DEFAULTS_W_ARG(farg) \ | ||
| __FILE__, sizeof(farg) / sizeof(CLICMDARGDEF), farg, CLICMDFLAG_FPS, NULL, NULL, NULL | ||
| #define CLICMD_FIELDS_NOFPSS_W_ARG(farg) \ | ||
| __FILE__, sizeof(farg) / sizeof(CLICMDARGDEF), farg, 0, NULL, NULL, NULL | ||
|
|
||
|
|
Comment on lines
+385
to
+386
| add_link_options(--coverage) | ||
| link_libraries(gcov) |
686bda3 to
89110c5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed CUDA build.
Couple executables were missing linkage options. Larger diff because pre-commit doing its thing.
One path had old macro arguments that weren't compiling, for cause of
fargnot being defined and calledcm_farg, failingCLICMD_FIELDS_DEFAULTS.Actually upon inspection, I realize that this is because there are two function definitions in this file? With one with everything called CM and the other with everything called CO.
this second one is most definitely broken since CLICMD_FIELDS_DEFAULTS requires farg, which is now the former cm_farg
This raises something important: blind side effect macros are less than sub-ideal, or even macros requiring static variable names. In the best case, a macro should be an (inlinable, or constexpr if allowable in c++ areas) function; in other cases, it should take the variables it uses as arguments to avoid issues such as this.
@oguyon fix requires another fix to solve intended purpose of
co_fargin this file and maybe others.