Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CMake] Add ACPP_HAS_* values to CMake integration. #1362

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

fodinabor
Copy link
Collaborator

So far, to my knowledge, it is not easily possible to query on the CMake level whether the used AdaptiveCpp was built with certain features.
This adds a bunch of feature flags to the CMake integration making this quite simple.

E.g. CMake users can now just switch on ACPP_HAS_SCPP which target to set, omp;generic if SSCP is available, omp;cuda:sm_80,sm_75;hip:gfx90c or sth like this otherwise (the backend flags might help determine which targets to actually include ;-)).

Further, this adds feature flags and the REQUIRES: clause to the LIT tests.
With this, ninja check can always be executed independent of the actual supported feature set, as only those tests that are supported are run.
This also prevents CPU overcommitting due to the parallelization done by the build system (ninja) and lit.

So far, to my knowledge it is not easily possible to query on the CMake level whether the used AdaptiveCpp was built with certain features.
This adds a bunch of feature flags to the CMake integration making this quite simple.

E.g. CMake users can now just switch on `ACPP_HAS_SCPP` which target to set, `omp;generic` if SSCP is available, `omp;cuda:sm_80,sm_75;hip:gfx90c` or sth like this otherwise (the backend flags might help determine which targets to actually include ;-)).
With this, `ninja check` can always be executed independent of the actual supported feature set, as only those tests that are supported are run.
This also prevents CPU overcomitting due to the parallelization done by the buildsystem (ninja) and lit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant