1#include "gtest/gtest.h"
23#if !defined(KOKKOS_EXECUTION_ENABLE_EVENT_DISPATCH)
24# error "This is not supported."
29using namespace Kokkos::utils::callbacks;
45 const auto [exec_A, exec_B] = Kokkos::Experimental::partition_space(
exec, 1, 1);
47 const auto recorded_events = recorder_listener_t::record(
51 ASSERT_THAT(recorded_events, ::testing::SizeIs(2));
56 ASSERT_THAT(recorded_events, testing::IsEmpty());
67 if constexpr (std::same_as<TEST_EXECUTION_SPACE, Kokkos::DefaultHostExecutionSpace>) {
68 GTEST_SKIP() <<
"The default host execution space is the same type as the test execution space.";
71 const Kokkos::DefaultHostExecutionSpace exec_h;
73 const auto recorded_events = recorder_listener_t::record(
constexpr std::string dispatch_label(const Exec &, Label &&label)
Get the dispatch label from Exec and label.
#define MATCHER_FOR_WAIT_EXEC_EVENT(_exec_, _record_event_variant_)
#define MATCHER_FOR_RECORD_EVENT(_exec_)
#define MATCHER_FOR_BEGIN_FENCE(_exec_, _label_)
RecorderListener< EventDiscardMatcher< TEST_EXECUTION_SPACE >, BeginFenceEvent, Kokkos::Execution::Impl::RecordEvent, Kokkos::Execution::Impl::WaitEvent > recorder_listener_t
Determine if the Kokkos backend can enqueue a wait for an event into an execution space instance.
bool are_same_instances(const Exec &exec, const OtherExec &other_exec)
Matcher to filter out events that are just noise for tests.
This is the default implementation.
Event to be sent to Kokkos::utils::callbacks::dispatch when calling record.
Event to be sent to Kokkos::utils::callbacks::dispatch when calling wait.