-
Notifications
You must be signed in to change notification settings - Fork 436
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
This makes the math function use the "C" interface for GCC 5 #4733
Conversation
Tested with:
using CUDA 10.1 and GCC 5.3 |
@@ -91,8 +91,12 @@ namespace Experimental { | |||
#if defined(KOKKOS_ENABLE_SYCL) | |||
#define KOKKOS_IMPL_MATH_FUNCTIONS_NAMESPACE sycl | |||
#else | |||
#if defined(KOKKOS_ENABLE_CUDA) && defined(__GNUC__) && (__GNUC__ < 6) |
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.
Is it a problem that this path might also be taken by a compiler different from g++
, like icpc
or clang++
?
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.
what do you mean? The issue is the C++ cmath header, which should only depend on the GNUC
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.
or are you worried this is getting taken by clang when it is supposed to use its own headers?
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.
clang
doesn't like this:
/var/jenkins/workspace/Kokkos/core/src/Kokkos_MathematicalFunctions.hpp:298:34: error: reference to __device__ function 'isinf' in __host__ __device__ function [clang-diagnostic-error]
When compiling for CUDA with GCC 5 the std::functions don't have the right markup, so you get all these warnings or errors about calling pure host functions in our math functions. Prior to GCC 6 you have to call for example fmin instead of std::fmin
7c9bf21
to
6943996
Compare
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.
Looks good to me.
Retest this please. |
Retest this please |
1 similar comment
Retest this please |
Failures are unrelated |
When compiling for CUDA with GCC 5 the std::functions don't have
the right markup, so you get all these warnings or errors about
calling pure host functions in our math functions.
Prior to GCC 6 you have to call for example fmin instead of std::fmin