-
Notifications
You must be signed in to change notification settings - Fork 407
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
Define KOKKOS_COMPILER_INTEL_LLVM and only define at most one KOKKOS_COMPILER* macro #5906
Define KOKKOS_COMPILER_INTEL_LLVM and only define at most one KOKKOS_COMPILER* macro #5906
Conversation
ada9a07
to
fae8ed1
Compare
|
||
#if defined(__APPLE_CC__) | ||
#elif defined(__APPLE_CC__) |
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.
Since you're now making these definitions strictly mutually exclusive, please check that any places that were testing KOKKOS_COMPILER_CLANG
are suitably adapted to check defined(KOKKOS_COMPILER_CLANG) || defined(KOKKOS_COMPILER_APPLECC)
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 did now. We only really check for Clang
when CUDA
or OpenMPTarget
is enabled and AppleClang
wouldn't work in these cases anyway. There is of course also the check for builtins that need some love anyway.
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.
Things generally look good now. I haven't grepped for all of the uses of the affected macros myself to confirm that there are no missing updates.
11786bb
to
05b6466
Compare
I've checked over all of the uses of There's one non-Kokkos usage of the macro in Trilinos to work around an Intel ICE in the Kokkos 3.5 PR |
05b6466
to
98a6c4f
Compare
98a6c4f
to
a4749f4
Compare
Would be good to fix the commit message to reflect the full scope of the PR. |
a4749f4
to
e950e24
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.
Please add a unit_tests/TestCompilerMacros.cpp
and check that one and only one macro is being defined.
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 those other macros like ivdep should be defined for Intel LLVM
core/src/Kokkos_Macros.hpp
Outdated
@@ -176,19 +172,17 @@ | |||
//---------------------------------------------------------------------------- | |||
// Intel compiler macros | |||
|
|||
// FIXME_INTEL_LLVM: Figure out whether these pragmas should get set similarly | |||
// to the classic Intel compiler |
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.
yes
dbd562b
to
d80f580
Compare
Only
|
// Very old define | ||
#define KOKKOS_COMPILER_INTEL __ECC | ||
#endif | ||
#define KOKKOS_COMPILER_INTEL_LLVM __INTEL_LLVM_COMPILER |
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. I will follow this concept for the Cray one too in #5889
Ignoring GCC-8.4.0 failure which is clearly unrelated (running out of memory) |
As discussed this pull request defines a new compiler macro that allows distinguishing between the Intel Classic Compiler (icpc) and the Intel oneAPI Compiler (icpx). I went through the places that use
KOKKOS_COMPILER_INTEL_LLVM
and replaced/added/omitted where I saw fit.Also, this pull request makes sure that only at most one compiler macro
KOKKOS_COMPILER*
is defined (apart fromKOKKOS_COMPILER_NVCC
which can appear additionally). I'm happy to separate this change from this pull request if preferred.