-
Notifications
You must be signed in to change notification settings - Fork 75
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
add CMake presets #2203
add CMake presets #2203
Conversation
f387bd5
to
bdc8774
Compare
@bernhardmgruber @psychocoderHPC Can you please have a look on the name scheme of the profiles and also the enabled arguments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that except for the gpu-sycl-intel
preset, where the cmake options are harder to figure out, this CMake presets file would not help me much :S
In LLAMA, I use this for example:
{
"name": "default",
"toolchainFile": "~/dev/vcpkg/scripts/buildsystems/vcpkg.cmake",
"cacheVariables": {
"BUILD_TESTING": "ON",
"LLAMA_BUILD_EXAMPLES": "ON",
"alpaka_ACC_CPU_B_SEQ_T_SEQ_ENABLE": "ON",
"Boost_NO_WARN_NEW_VERSIONS": "ON"
}
}
Because specifying the toolchain file annoying, I don't have tests and examples enabled by default, but this is what I do locally almost 100%. I suppress Boost warnings in CMake and I want to usually have the alpaka serial accelerator, so all examples compile.
For alpaka, I would rather use a similar config, e.g.:
{
"name": "minimal",
"cacheVariables": {
"BUILD_TESTING": "ON",
"alpaka_BUILD_EXAMPLES": "ON",
"alpaka_ACC_CPU_B_SEQ_T_SEQ_ENABLE": "ON",
"Boost_NO_WARN_NEW_VERSIONS": "ON"
}
}
Or one to have all CPU backends:
{
"name": "all_cpu",
"cacheVariables": {
"BUILD_TESTING": "ON",
"alpaka_BUILD_EXAMPLES": "ON",
TODO: enable all CPU backends
"alpaka_ACC_CPU_B_SEQ_T_SEQ_ENABLE": "ON",
"Boost_NO_WARN_NEW_VERSIONS": "ON"
}
}
I think the CMake presets should not provide yet another configuration mechanism to enable/disable backends, ccmake
works good for this, but rather support common work flows.
The basic idea of the presets are the following:
I would also not enable all CPU backends at the same time. This requires that you install OpenMP and Intel TBB on your system on the same time. And I avoid to use |
Right, so it's intended for developers and not downstream users.
We don't need that, because this is what documentation is for.
Which I have and whenever I want to test all backends, I would want to have a preset for this :)
I completely disagree, it's the bread and butter of configurating. It's very approachable and nicely shows what kind of options a project has.
That's a fair point and that's why I configure with a fixed command line when doing reproducible benchmarks. But for normal coding, |
Anyhow, I let @psychocoderHPC take over this review. |
I prefer an interactive documentation compare to text. It's true, I can compile all information from the README. But why I should do it, if the preset is already doing it for me?
Fine, I will add one. I will not hurt.
We work completely different. I only use directly |
@bernhardmgruber After our discussion, I would do the following things:
[1] I'm not sure if we should enabled I would keep setting the CXX compiler for Intel Sycl and AMD HIP because this is a big source of errors to forget it. My idea of the presets is, that you have a preset for each backend that you have an easy start point to build the examples and tests for the backend. And you can use the presets to inherent from it with your Personally, I will not use the |
@SimeonEhrig do what works best for you! And I like your suggestions. I also did not know about |
f67484b
to
969cd6e
Compare
@psychocoderHPC please also share your opinion on how you would want to use presets, or not :) @SimeonEhrig: btw, great work on the documentation! |
969cd6e
to
560c90d
Compare
@bernhardmgruber René wrote in the internal chat, that he cannot give feedback and is fine with your review. |
Great! However, I do not have the permissions to merge a PR with failing tests or with @psychocoderHPC's review pending. You have to ask @psychocoderHPC to merge it. |
add CMake presets to make it easier to compile alpaka for different backends
TODO
Usage
Testing
Because of more urgent other tasks I will add tests later during working on PR #919 and #1019. If the CMake presets get broken, nothing else will be affected.