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

OpenMPTarget: MDRange parallel_reduce #4032

Merged
merged 10 commits into from
May 20, 2021

Conversation

rgayatri23
Copy link
Contributor

The PR contains the following:

  1. MDRange parallel_reduce implementation
  2. Implement copy-back in cases where reduction happens on a device view.
  3. Enable corresponding tests.

@rgayatri23 rgayatri23 requested review from dalg24 and crtrott May 17, 2021 17:13
@masterleinad
Copy link
Contributor

/var/jenkins/workspace/Kokkos/core/src/impl/Kokkos_Profiling.hpp:259:20: error: no member named 'max_tile_size_product' in 'Kokkos::Impl::ParallelReduce<(lambda at /var/jenkins/workspace/Kokkos/core/unit_test/incremental/Test14_MDRangeReduce.hpp:125:9), Kokkos::MDRangePolicy<Kokkos::Experimental::OpenMPTarget, Kokkos::Rank<2, Kokkos::Iterate::Default, Kokkos::Iterate::Default>, Kokkos::IndexType<int>>, Kokkos::InvalidType, Kokkos::Experimental::OpenMPTarget>'
    return driver::max_tile_size_product(policy, functor);
                   ^

@rgayatri23
Copy link
Contributor Author

/var/jenkins/workspace/Kokkos/core/src/impl/Kokkos_Profiling.hpp:259:20: error: no member named 'max_tile_size_product' in 'Kokkos::Impl::ParallelReduce<(lambda at /var/jenkins/workspace/Kokkos/core/unit_test/incremental/Test14_MDRangeReduce.hpp:125:9), Kokkos::MDRangePolicy<Kokkos::Experimental::OpenMPTarget, Kokkos::Rank<2, Kokkos::Iterate::Default, Kokkos::Iterate::Default>, Kokkos::IndexType<int>>, Kokkos::InvalidType, Kokkos::Experimental::OpenMPTarget>'
    return driver::max_tile_size_product(policy, functor);
                   ^

Fixed it.

Copy link
Member

@dalg24 dalg24 left a comment

Choose a reason for hiding this comment

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

Looks fine besides the invalid specializations for rank 1 and 7

}

template <int Rank, class ValueType>
inline typename std::enable_if<Rank == 7>::type execute_tile(
Copy link
Member

Choose a reason for hiding this comment

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

We don't support rank == 7

static_assert(N < 7u, "Kokkos Error: Unsupported rank...");

memory_space>::accessible) {}

template <int Rank, class ValueType>
inline typename std::enable_if<Rank == 1>::type execute_tile(
Copy link
Member

Choose a reason for hiding this comment

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

Rank has to be at least 2

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 Delete implementations for rank > 6 and rank < 2.

@crtrott crtrott merged commit e104ec6 into kokkos:develop May 20, 2021
@rgayatri23 rgayatri23 deleted the OpenMPTarget_MDReduce branch March 24, 2023 22:03
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