-
Couldn't load subscription status.
- Fork 109
Ifpack2 btds gemm #2829
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
base: develop
Are you sure you want to change the base?
Ifpack2 btds gemm #2829
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.
| if (r == 0) { | ||
| int V_extent_0 = V_rank == 0 ? 0 : v.extent_int(0); | ||
| return V_extent_0; | ||
| } else if (r == 1) { | ||
| int V_extent_1 = V_rank == 0 ? 0 : V_rank == 1 ? 1 : v.extent_int(1); | ||
| return V_extent_1; | ||
| } else { | ||
| return -1; | ||
| } | ||
| } |
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.
| if (r == 0) { | |
| int V_extent_0 = V_rank == 0 ? 0 : v.extent_int(0); | |
| return V_extent_0; | |
| } else if (r == 1) { | |
| int V_extent_1 = V_rank == 0 ? 0 : V_rank == 1 ? 1 : v.extent_int(1); | |
| return V_extent_1; | |
| } else { | |
| return -1; | |
| } | |
| } | |
| if (r == 0) { | |
| int V_extent_0 = V_rank == 0 ? 1 : v.extent_int(0); | |
| return V_extent_0; | |
| } else if (r == 1) { | |
| int V_extent_1 = V_rank <= 1 ? 1 : v.extent_int(1); | |
| return V_extent_1; | |
| } else { | |
| return 1; | |
| } |
I think extent would be computed like this.
|
I tested this PR with/without Yuichi's suggestion, gcc/11.3, OpenMPI/4.1.5 Serial build with the new View enabled, I'm still seeing the test failures: Tested with: |
|
@ndellingwood Thank you for the information The stride computation may be like this? template <typename ViewType>
KOKKOS_INLINE_FUNCTION std::size_t get_stride(const ViewType &v, const int r) {
static_assert(Kokkos::is_view_v<ViewType>, "KokkosBatched: ViewType is not a Kokkos::View.");
constexpr std::size_t V_rank = ViewType::rank();
static_assert(V_rank <= 2, "KokkosBatched: ViewType must have rank 0, 1 or 2.");
if (r == 0) {
std::size_t V_stride_0 = V_rank == 0 ? 1 : v.stride(0);
return V_stride_0;
} else if (r == 1) {
std::size_t V_stride_1 = V_rank <= 1 ? 1 : v.stride(1);
return V_stride_1;
} else {
return 1;
}
} |
|
Cross-referencing issue #2622 |
|
I retested as a sanity check
All jobs above enabled the new View impl and complex types |
|
I rebuilt with @yasahi-hpc suggestion (thank you!) , and the Serial job with SKX still exhibits the failures |
|
I retested Trilinos@develop (containing the 4.7.01 releases as packages) in the Serial build with SKX and the legacy View, and the
To move forward, it looks like we need
|
)" This reverts commit 82605a9. Signed-off-by: Luc Berger-Vergiat <lberge@sandia.gov>
This reverts commit 386663c. Signed-off-by: Luc Berger-Vergiat <lberge@sandia.gov>
We have been liberally querrying the extent and stride of Views without checking if the rank of the view is high enough to return a valid value. The fixes lead to failures in BTDS which might point to a bug that relied on the old UB behavior of Kokkos::View x( Signed-off-by: Luc Berger-Vergiat <lberge@sandia.gov>
337b1f5 to
c301882
Compare
Signed-off-by: Luc Berger-Vergiat <lberge@sandia.gov>
|
Thanks a lot for your help. |
Pushing some preliminary changes based of the previous work by @yasahi-hpc
The goal is to isolate the failure that ensue in Trilinos' BTDS solver.
The current changes are sufficient to make the BTDS fail which might indicate that the underlying issue is a bad usage of Kokkos View?