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

Unify algorithm unit tests to avoid code duplication #3851

Merged
merged 20 commits into from
Apr 7, 2021

Conversation

masterleinad
Copy link
Contributor

@masterleinad masterleinad commented Mar 15, 2021

This follows the same approach we are taking for core/unit_test.

@masterleinad masterleinad changed the title Implement SYCL Random Unify algorithm unit tests to avoid code duplication Mar 15, 2021
TestOpenMP.cpp
LIST(APPEND ALGORITHM_SOURCES
TestOpenMP_Sort1D.cpp
TestOpenMP_Sort3D.cpp
TestOpenMP_SortDynamicView.cpp
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TestOpenMP.cpp is merged into TestOpenMP_Sort1D.cpp and TestOpenMP_Randonm.cpp is the test corresponding to TestBACKEND.cpp for the other backends.

@@ -42,36 +42,14 @@
//@HEADER
*/

#include <Kokkos_Macros.hpp>
#ifdef KOKKOS_ENABLE_OPENMP
#ifndef KOKKOS_TEST_CUDA_HPP
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These files are verbatim copied from core/unit_test.

@masterleinad masterleinad marked this pull request as ready for review March 16, 2021 16:17
@masterleinad masterleinad marked this pull request as draft March 16, 2021 21:21
@masterleinad masterleinad marked this pull request as ready for review March 18, 2021 00:36
@masterleinad
Copy link
Contributor Author

We could save a lot of LOC if we are to combine the Kokkos_BACKEND_Category.hpp for algorithms, containers and core somehow.

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.

I see the scope of this PR creeped quire a bit. I am sure we can improve even further but let's not go too crazy.

@masterleinad
Copy link
Contributor Author

I would also be happy to split the pull request and combine all the *Category* files in a separate one if preferred.

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.

Personally I wouldn't worry about splitting it up, this looks like a good bit of work

@masterleinad
Copy link
Contributor Author

Retest this please.

@dalg24 dalg24 merged commit dc65948 into kokkos:develop Apr 7, 2021
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

3 participants