Skip to content
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

kokkos: add in-place overwriting triangular_matrix_{left,right}_product #221

Merged
merged 1 commit into from
Jun 15, 2022

Conversation

mzuzek
Copy link

@mzuzek mzuzek commented May 26, 2022

This PR supplies Kokkos implementation for in-place variants of overwriting triangular_matrix_{left,right}_product()
(which I somehow missed on #212...)

Detected by tests [to be] failing on CI: 20 - trmm (SEGFAULT) (related to #218)

@mzuzek mzuzek requested review from mhoemmen and fnrizzi May 26, 2022 10:35
@mzuzek mzuzek self-assigned this May 26, 2022
C_view(i, j) += /* 1 times */ B_view(i, j);
}
});
// Note: This routine can be called in-place with B_view=C_view
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As an implementation detail that's fine; please just note that the not-in-place overwriting overloads do not allow this.

// Note: This routine can be called in-place with B_view=C_view
// because (i,j) indexing respects C updating order
// and parallelism is restricted accordingly
for (size_type ii = 0; ii < C_ext0; ++ii) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did y'all ever find it weird that the "kokkos-kernels" back end can't actually call kokkos-kernels for most of the algorithms, because kokkos-kernels never bothered to wrap most of the BLAS?

// and the execution space is ignored
if constexpr (std::is_same_v<DiagonalStorage,
std::experimental::linalg::implicit_unit_diagonal_t>) {
matproduct_impl::trmm_left(ExecSpace(), t, d, A_view, C_view, C_view);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do consider storing the actual execution space instance in kokkos_exec at some point.

@mhoemmen mhoemmen merged commit 7374ebb into kokkos:main Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants