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

Add missing specailization for OMPT to Kokkos Random #3967

Merged
merged 4 commits into from
May 12, 2021

Conversation

crtrott
Copy link
Member

@crtrott crtrott commented Apr 26, 2021

No description provided.

@masterleinad
Copy link
Contributor

Retest this please.

Copy link
Contributor

@masterleinad masterleinad left a comment

Choose a reason for hiding this comment

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

Implement the spin loop.

@crtrott crtrott force-pushed the omptarget-random_unique_index branch from 7394dd8 to af18499 Compare May 6, 2021 16:55
algorithms/CMakeLists.txt Outdated Show resolved Hide resolved
algorithms/unit_tests/TestSort.hpp Outdated Show resolved Hide resolved
@masterleinad masterleinad dismissed their stale review May 6, 2021 17:18

Critical changes were addressed.

// FIXME_OPENMPTARGET: Need this for OpenMPTarget because contra to the standard
// llvm requires the binary operator defined not just the +=
KOKKOS_INLINE_FUNCTION
RandomProperties operator+(const RandomProperties& org,
Copy link
Member

Choose a reason for hiding this comment

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

What is "org" short for?

Copy link
Member Author

Choose a reason for hiding this comment

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

original I guess?

crtrott and others added 2 commits May 6, 2021 12:40
OpenMPTarget algorithms unit test CMake: less convoluted condition

Co-authored-by: Daniel Arndt <arndtd@ornl.gov>
Co-authored-by: Daniel Arndt <arndtd@ornl.gov>
Copy link
Contributor

@masterleinad masterleinad left a comment

Choose a reason for hiding this comment

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

Looks OK.

Copy link
Contributor

@rgayatri23 rgayatri23 left a comment

Choose a reason for hiding this comment

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

LGTM

using locks_view_type = View<int*, Kokkos::Experimental::OpenMPTarget>;
KOKKOS_FUNCTION
static int get_state_idx(const locks_view_type& locks) {
const int i = omp_get_team_num() * 1024 + omp_get_thread_num();
Copy link
Contributor

Choose a reason for hiding this comment

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

why 1024 instead of 2048 ?

crtrott added a commit that referenced this pull request May 12, 2021
[3.4.1] Take over #3967: Add missing specailization for OMPT to Kokkos Random
@crtrott crtrott merged commit 3b610b2 into kokkos:develop May 12, 2021
@crtrott crtrott deleted the omptarget-random_unique_index branch May 12, 2021 18:55
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.

None yet

4 participants