Skip to content

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

Merged
mhoemmen merged 1 commit into
kokkos:mainfrom
NexGenAnalytics:trmm_missing_in-place
Jun 15, 2022
Merged

mhoemmen merged 1 commit into
kokkos:mainfrom
NexGenAnalytics:trmm_missing_in-place

Conversation

@mzuzek

@mzuzek mzuzek commented May 26, 2022

Copy link
Copy Markdown

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 fnrizzi and mhoemmen 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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