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

Always run Graph tests #7011

Merged
merged 3 commits into from
May 20, 2024
Merged

Conversation

masterleinad
Copy link
Contributor

If we don't have a specialization for the Graph implementation, kernels are just executed in order. Hence, we should always be able to test the Graph implementation and don't need to create separate executables which brings the test more inline with our general testing approach (by auto-generating the test files for individual backends).
Related to #6912.

@@ -23,5 +23,6 @@
#define TEST_CATEGORY_NUMBER 7
#define TEST_CATEGORY_DEATH sycl_DeathTest
#define TEST_EXECSPACE Kokkos::Experimental::SYCL
#define TEST_CATEGORY_FIXTURE(name) sycl_##name
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a suggestion:

#define TEST_CATEGORY_FIXTURE(name) sycl_##name
#define TEST_CATEGORY_DEATH TEST_CATEGORY_FIXTURE(DeathTest)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would rather not since that would suggest mixing macros defined for fixtures with death tests that don't require fixtures.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, up to you 😉

Copy link
Contributor

@romintomasetti romintomasetti left a comment

Choose a reason for hiding this comment

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

OK, this PR really makes sense !

@masterleinad masterleinad marked this pull request as ready for review May 15, 2024 13:54
#endif
graph.submit(); // should reset to 0, but doesn't
graph.submit();
Copy link
Member

Choose a reason for hiding this comment

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

Why is it ok to remove that comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It didn't make sense to me. The submission is resetting to zero and that's what we are testing.

Kokkos::fence();
if constexpr (std::is_same_v<TEST_EXECSPACE, Kokkos::Cuda>) Kokkos::fence();
#endif
// FIXME_HPX graph.submit() isn't properly enqueued
Copy link
Member

Choose a reason for hiding this comment

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

Nitpick: I would have put the comment on the same line as the #ifdef (if that fits without breaking the line)

@dalg24 dalg24 merged commit f8f0cc4 into kokkos:develop May 20, 2024
28 of 29 checks passed
@dalg24
Copy link
Member

dalg24 commented May 21, 2024

It looks like we were careless when we merged this PR.
The OpenMPTarget build has a compile error

In file included from /var/jenkins/workspace/Kokkos_PR-7011/build/core/unit_test/openmptarget/TestOpenMPTarget_Graph.cpp:2:
In file included from /var/jenkins/workspace/Kokkos_PR-7011/core/unit_test/TestGraph.hpp:18:
In file included from /var/jenkins/workspace/Kokkos_PR-7011/core/src/Kokkos_Graph.hpp:161:
/var/jenkins/workspace/Kokkos_PR-7011/core/src/impl/Kokkos_GraphNodeImpl.hpp:147:21: error: call to implicitly-deleted copy constructor of 'Kokkos::Impl::GraphNodeKernelImpl<Kokkos::Experimental::OpenMPTarget, Kokkos::RangePolicy<Kokkos::Experimental::OpenMPTarget, Kokkos::Impl::IsGraphKernelTag>, Kokkos::Impl::CombinedFunctorReducer<Test::SetResultToViewFunctor<Kokkos::Experimental::OpenMPTarget, int>, Kokkos::Impl::FunctorAnalysis<Kokkos::Impl::FunctorPatternInterface::REDUCE, Kokkos::RangePolicy<Kokkos::Experimental::OpenMPTarget>, Test::SetResultToViewFunctor<Kokkos::Experimental::OpenMPTarget, int>, int>::Reducer>, Kokkos::ParallelReduceTag>'
  147 |       : base_t(ex), m_kernel((KernelDeduced &&) arg_kernel) {}
      | 

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