-
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
Switch to C++17 #1466
Switch to C++17 #1466
Conversation
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.
Thanks! A few remarks:
5618594
to
cde7240
Compare
It looks like we are going to need to drop clang-5 as well:
|
Weird, looks like nvcc doesn't know that clang 5 has C++17 support. Maybe we can add a |
We could. clang 5 should support it. But then there is no official way to query what host compiler is used via cmake. See also: https://gitlab.kitware.com/cmake/cmake/-/issues/20901. |
IMO clang5 should be dropped instead of adding workarounds. |
Should we keep it as a normal C++ compiler and just disable it for CUDA? |
@bernhardmgruber Please also remember to update the support matrix in |
Did I update the support matrix incorrectly? |
Ah, no, you didn't. I just somehow skipped over it during my last review. My bad. |
Switching to C++17 does not fix compilation with nvcc 11.0/11.1 and MSVC. It seems we can therefore not fix #1331 with this PR. |
The issue is different, though. The last time it complained about |
I'm happy to ditch CUDA 11.0 and 11.1, though. @psychocoderHPC, what do you think? |
Removing the support for CUDA 11.0/11.1 on Windows is IMO no problem. |
The first few lines of |
cde7240
to
55fed54
Compare
During the alpaka VC we decided to not add nvcc 11.0/11.1 + MSVC support again and also drop support for nvcc with clang-5 as host compiler (clang-5 stays supported without nvcc). |
fea6022
to
762c53b
Compare
I tried several workarounds locally suggested by @psychocoderHPC, passing |
I can reproduce the issue locally as well. Just run:
|
762c53b
to
d2fd2cd
Compare
It seems we can also not test clang-6 with nvcc 11 in the Gitlab CI, because libomp-6-dev is not available on either Ubuntu 18.04 or 20.04. I upgrade the job to clang-7 therefore. |
After feedback from @psychocoderHPC, I removed clang as CUDA compiler runs with clang < 11. See comment here: #1011 (comment). |
4d881cd
to
57ed7f8
Compare
@psychocoderHPC suggested to me to keep CUDA < 11 for clang as CUDA compiler, since the objective is just to move to C++17. I therefore readded the runs with clang and older CUDA versions. |
* Require C++17 in CMake * Remove nvcc version below 11 from GitHub CI * Remove CUDA SDK installer below 9.2 from install scripts * Update supported CUDA versions in README.md * Eliminate obsolete C++ version checks * Remove support for nvcc + clang-5 * Update documentation * Fix warnings * Merge GitLab CI CUDA job description files * Add a GitLab CI test with clang-12 as CUDA compiler and cuda11.0 * Add GitHub CI test with clang-12 + nvcc 11.4 * support passing CMAKE_CUDA_FLAGS variable through CI
57ed7f8
to
4467954
Compare
OK, CI passing, seems we are good! :) |
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.
Looking good, thanks! I'll remove the deleted CI jobs from the branch protection rules. Three questions:
Should todos that have been marked for the C++17 move be addressed in this PR? There is at least this one: https://github.com/jkelling/alpaka/blob/develop/include/alpaka/rand/RandDefault.hpp#L135-L140 |
IMHO it shouldn't. This PR just enables C++17. We can (and should) do the cleanup of the code base in a follow up PR. This is already large enough as-is. |
This PR switches to C++17, including: