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
Fix issue when compiling with HIP #15862
Conversation
include/deal.II/base/numbers.h
Outdated
@@ -41,7 +41,7 @@ | |||
// This is problematic when calling non-constexpr functions in constexpr | |||
// functions. Hence, we need a way to annotate functions explicitly as | |||
// host-only. | |||
#if defined(__clang__) && defined(__CUDA__) | |||
#if defined(__clang__) && defined(__CUDA__) || defined(KOKKOS_ENABLE_HIP) |
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 always forget if &&
has precedence over ||
.
#if defined(__clang__) && defined(__CUDA__) || defined(KOKKOS_ENABLE_HIP) | |
#if (defined(__clang__) && defined(__CUDA__)) || defined(KOKKOS_ENABLE_HIP) |
Also, the above command also doesn't match anymore. Maybe, say something like
// clang++ assumes that all constexpr functions are __host__ __device__ when `Kokkos` was configured with `HIP` or `CUDA` support. [...]
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 always forget if && has precedence over ||
It doesn't matter since all the HIP compiler are clang based
/rebuild |
Co-authored-by: Marc Fehling <mafehling.git@gmail.com>
With this PR I can compile and run deal.II on Frontier.