Skip to content

Fix for mdspan > 0.4.0 - #241

Merged
crtrott merged 7 commits into
kokkos:mainfrom
mhoemmen:Fix-after-mdspan-0.4.0
Jul 6, 2022
Merged

crtrott merged 7 commits into
kokkos:mainfrom
mhoemmen:Fix-after-mdspan-0.4.0

Conversation

@mhoemmen

@mhoemmen mhoemmen commented Jun 30, 2022

Copy link
Copy Markdown
Contributor

The recently merged mdspan PR kokkos/mdspan#147 is a breaking change. This commit makes stdblas build with that change.

My changes to the kokkos-based tests are best effort only; I haven't tested that build yet.

@youyu3

@mhoemmen
mhoemmen requested review from crtrott, dalg24 and nliber June 30, 2022 21:34
The recently merged mdspan PR kokkos/mdspan#147
is a breaking change.  This commit makes stdblas build with that change.

My changes to the kokkos-based tests are best effort only;
I haven't tested that build yet.
mhoemmen added 6 commits July 4, 2022 21:18
Thanks to Yu You for the reproducer.

This may fix kokkos#242, though I don't have an MSVC 2022 build set up to
reproduce.  This change fixes the GCC 9.4.0 build (after adding the
reproducer).
Thanks to Yu You for pointing this out!
We were using size_t as the index type.
For extents with a signed index type,
this could cause a build warning,
due to signed-to-unsigned integer conversion.
void add_rank_2(
std::experimental::mdspan<ElementType_x, std::experimental::extents<SizeType_x, numRows_x, numCols_x>, Layout_x, Accessor_x> x,
std::experimental::mdspan<ElementType_y, std::experimental::extents<SizeType_y, numCols_y>, Layout_y, Accessor_y> y,
std::experimental::mdspan<ElementType_y, std::experimental::extents<SizeType_y, numRows_y, numCols_y>, Layout_y, Accessor_y> y,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

?? was that wrong rank before?

using sum_type = decltype (B(i,j) - A(0,0) * X(0,0));
sum_type t (B(i,j));
for (size_type k = j + 1; k < A_num_rows; ++j) {
for (size_type k = j + 1; k < A_num_rows; ++k) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

OMG ...

@crtrott
crtrott merged commit 8a83bec into kokkos:main Jul 6, 2022
@mhoemmen
mhoemmen deleted the Fix-after-mdspan-0.4.0 branch July 6, 2022 14:04
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