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

Allow Kokkos::resize to take an execution space #4844

Merged
merged 13 commits into from
Jul 6, 2022

Conversation

masterleinad
Copy link
Contributor

@masterleinad masterleinad commented Mar 4, 2022

Related to #4792, #4823, and #4826. Specifying an execution space, we could at least get rid of a global fence (and possibly some instance fences depending on #4823 and #4826).
If the View's count is 1, we of course still deallocate data which implies a global fence.

So far tests are missing and this is mostly intended to discuss if we want to provide these overloads.

@masterleinad masterleinad added the Question For Kokkos internal and external contributors and users label Mar 4, 2022
@masterleinad masterleinad marked this pull request as ready for review May 10, 2022 09:14
@masterleinad
Copy link
Contributor Author

Retest this please.

@masterleinad masterleinad added the Blocks Promotion Overview issue for release-blocking bugs label Jun 22, 2022
Copy link
Member

@crtrott crtrott left a comment

Choose a reason for hiding this comment

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

A few questions.

static_assert(
!alloc_prop_input::allow_padding,
"The view constructor arguments passed to Kokkos::resize must "
"not explicitly allow padding!");
Copy link
Member

Choose a reason for hiding this comment

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

Why this one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the discussion around #5035 (comment) we said that we shouldn't be allowed to explicitly request padding but I'm happy to change if that's what we want.

core/src/Kokkos_CopyViews.hpp Outdated Show resolved Hide resolved
core/src/Kokkos_CopyViews.hpp Outdated Show resolved Hide resolved
core/src/Kokkos_CopyViews.hpp Show resolved Hide resolved
core/src/Kokkos_CopyViews.hpp Outdated Show resolved Hide resolved
core/src/Kokkos_CopyViews.hpp Outdated Show resolved Hide resolved
@masterleinad
Copy link
Contributor Author

Seems to work with Sacado.

@crtrott
Copy link
Member

crtrott commented Jun 30, 2022

Retest this please

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 Question For Kokkos internal and external contributors and users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants