-
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
Allow detecting SIMD types based on compiler macros #6188
Conversation
Retest this please. |
0260101
to
57a8502
Compare
8ca4b86
to
a7b70f4
Compare
simd/src/Kokkos_SIMD.hpp
Outdated
using host_abi_set = abi_set<simd_abi::scalar, simd_abi::avx512_fixed_size<8>>; | ||
using data_type_set = data_types<std::int32_t, std::uint32_t, std::int64_t, | ||
std::uint64_t, double>; | ||
#elif defined(KOKKOS_ARCH_AVX2) | ||
#elif defined(KOKKOS_ARCH_AVX2) || \ | ||
(defined(KOKKOS_ENABLE_IMPL_SIMD_NATIVE) && defined(__AVX2__)) | ||
using host_abi_set = abi_set<simd_abi::scalar, simd_abi::avx2_fixed_size<4>>; | ||
using data_type_set = | ||
data_types<std::int32_t, std::int64_t, std::uint64_t, double>; |
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.
Why does KOKKOS_ENABLE_IMPL_SIMD_NATIVE
not work for NEON> (line 162)?
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.
We are already auto-detecting the architecture for NEON
. We could discuss if we would hide that behind KOKKOS_ENABLE_IMPL_SIMD_NATIVE
or not given that we don't have an explicit architecture option for NEON
.
The focus at the moment is on all the changes not related to the new option and I will split the pull request/remove the changes adding testing before merging so that we can review the proposed option separately.
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.
Split things up:
Move the fix the host device annotation on simd_mask
operations to their own PR. This patch may be a candidate for cherry-picking into the 4.1 RC branch
Make sure you discuss the Impl::{value,mask}
friend functions being replaced by impl_*
member functions. (Probably belongs to its own PR as well)
b0ac874
to
19800cb
Compare
It's not super clear what this PR does, but I also don't see anything wrong with it |
Depends on #6223. |
9308fc1
to
59c7edc
Compare
@ldh4 , @ndellingwood #6232 is relevant to this issue. |
66dbaa6
to
febee80
Compare
46c8e20
to
ba660d3
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.
It just occurred to me that multiple of these macros might be defined.
What if both __AVX__
and __AVX2__
are defined?
Currently that would define both macros KOKKOS_ARCH_AVX
and KOKKOS_ARCH_AVX2
which would never happen before.
Disabling support for AVX512 when using
|
Right, but we only use these preprocessor definitions in |
I noticed that we didn't set the internal macros when rerunning |
Retest this please. |
Retest this please. |
|
Let's see if we can get the failure reproduced (and print the detected architecture in that case). |
Retest this please |
Looks like the problem with |
#6449 should be merged first. |
…S_AVX2, adn KOKKOS_COMPILER_HAS_AVX
3d862f0
to
c3b5037
Compare
Requested changes were addressed, the respective changes were separated form this pull request.
We have been noticing problems after merging SIMD pull requests that show that our CI support is pretty slim.
This pull request proposes allows
Kokkos_ARCH_NATIVE
add a CMake option that allowsenabling SIMD support macro-based.