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

Fixup MDRangePolicy construction from Kokkos arrays #3591

Merged

Conversation

dalg24
Copy link
Member

@dalg24 dalg24 commented Nov 13, 2020

Changes from #3527 broke

Kokkos::MDRangePolicy<ExecSpace, Kokkos::Rank<2>> policy(
    Kokkos::Array<long, 2>{0, 1},
    Kokkos::Array<long, 2>{2, 3});

Reported by @sslattery who noticed Cabana does not build with current HEAD of the develop branch
https://github.com/ECP-copa/Cabana/blob/a7ace070fa620dda285e7df2ed130416ec8524c8/cajita/src/Cajita_IndexSpace.hpp#L184-L186

The changes proposed enable constructions from Kokkos arrays of integral types (other than the internal storage typestd::int64_t which should be seen as implementation detail). Similarly to the construction from braced initializer lists, the conversions are checked.

@dalg24 dalg24 added Blocks Promotion Overview issue for release-blocking bugs DevelopOnly labels Nov 13, 2020
@dalg24 dalg24 requested a review from nliber November 13, 2020 18:53
Copy link
Contributor

@DavidPoliakoff DavidPoliakoff left a comment

Choose a reason for hiding this comment

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

I'd be astonished if the extra copies matter. If it passes the newly introduced test, LGTM.

core/src/KokkosExp_MDRangePolicy.hpp Outdated Show resolved Hide resolved
@dalg24 dalg24 force-pushed the fixup_mdrangepolicy_construction_from_arrays branch 2 times, most recently from 754fce3 to 99949c6 Compare November 15, 2020 21:49
@dalg24 dalg24 force-pushed the fixup_mdrangepolicy_construction_from_arrays branch from 99949c6 to 7e83b01 Compare November 16, 2020 00:09
@dalg24
Copy link
Member Author

dalg24 commented Nov 16, 2020

@crtrott crtrott merged commit 709475b into kokkos:develop Nov 17, 2020
@dalg24 dalg24 deleted the fixup_mdrangepolicy_construction_from_arrays branch November 17, 2020 02:14
masterleinad added a commit to masterleinad/kokkos that referenced this pull request Nov 17, 2020
…y_construction_from_arrays"

This reverts commit 709475b, reversing
changes made to 2cfb930.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocks Promotion Overview issue for release-blocking bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants