-
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
OpenMPTarget Index range fix for MDRange. #5089
OpenMPTarget Index range fix for MDRange. #5089
Conversation
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 we should update
kokkos/core/src/OpenMPTarget/Kokkos_OpenMPTarget_Parallel_MDRange.hpp
Lines 140 to 157 in cdcd690
#else | |
const ptrdiff_t begin_0 = offset[0]; | |
ptrdiff_t end_0 = begin_0 + policy.m_tile[0]; | |
end_0 = end_0 < policy.m_upper[0] ? end_0 : policy.m_upper[0]; | |
const ptrdiff_t begin_1 = offset[1]; | |
ptrdiff_t end_1 = begin_1 + policy.m_tile[1]; | |
end_1 = end_1 < policy.m_upper[1] ? end_1 : policy.m_upper[1]; | |
#pragma omp for collapse(2) | |
for (ptrdiff_t i0 = begin_0; i0 < end_0; ++i0) | |
for (ptrdiff_t i1 = begin_1; i1 < end_1; ++i1) { | |
if constexpr (std::is_void<typename Policy::work_tag>::value) | |
functor(i0, i1); | |
else | |
functor(typename Policy::work_tag(), i0, i1); | |
} | |
#endif |
and alike also (code path guarded by
#ifndef KOKKOS_IMPL_MDRANGE_USE_NO_TILES
)
Is this kokkos/core/src/OpenMPTarget/Kokkos_OpenMPTarget_Parallel_MDRange.hpp Lines 52 to 55 in cdcd690
still an issue? |
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.
This is progress.
Agreed. OK I'll merge as is and we can fix the alternate code path as a follow-up. |
This fixes the inconsistency in the OpenMPTarget backend observed here #4912