pika-org / pika

pika builds on C++ std::execution with fiber, CUDA, HIP, and MPI support.
https://pikacpp.org
Boost Software License 1.0
61 stars 10 forks source link

Test P2300 reference implementation with clang and CUDA #302

Closed msimberg closed 2 years ago

msimberg commented 2 years ago

I.e. check if the cce-cuda can have PIKA_WITH_P2300_REFERENCE_IMPLEMENTATION=ON and PIKA_WITH_CXX_STANDARD=20. If not, what needs to be fixed? We could also enable it on the HIP configuration.

msimberg commented 2 years ago

Did a small test and at least Cray's clang is not enough for this on Piz Daint.

Cray's clang is based on LLVM 12 and uses libstdc++ 8. The first problem is that the C++20 header <version> is not in libstdc++ 8. The next problem is that if I remember correctly clang doesn't work with libstdc++'s coroutines support. It seems like it may have been fixed in clang 14 (https://reviews.llvm.org/D109433), so that is the next thing to try. Cray's clang also can't use libc++.

So for testing the next thing I'm going to try upstream vanilla clang with libc++ and CUDA.

msimberg commented 2 years ago

Cray's clang based on LLVM 14 works better (and is available on Piz Daint). It's able to compile pika's host code with the P2300 reference implementation. However, it ICEs when compiling device code. A minimal reproducer is:

> module switch cce cce/14.0.0
> cat ranges.cu
#include <ranges>
> CC -std=c++20 ranges.cu

which is clearly unrelated to anything in pika or the P2300 reference implementation. Cray's clang 14 seems to be using libstdc++ 10.3.

msimberg commented 2 years ago

This is in progress, but I will not have time to finish this for 0.7.0.