1#ifndef KOKKOS_EXECUTION_TESTS_GRAPH_EVENTS_HPP
2#define KOKKOS_EXECUTION_TESTS_GRAPH_EVENTS_HPP
16#define MATCHER_FOR_GRAPH_CREATE(_device_handle_) \
19 &Kokkos::Execution::GraphImpl::GraphCreateEvent::dev_id, \
20 ::testing::Eq(Kokkos::Tools::Experimental::device_id(_device_handle_.m_exec))))
23#define MATCHER_FOR_GRAPH_ADDNODE(_graph_create_event_variant_, _device_handle_, _predecessor_) \
26 &Kokkos::Execution::GraphImpl::GraphAddNodeEvent::dev_id, \
27 ::testing::Eq(Kokkos::Tools::Experimental::device_id(_device_handle_.m_exec))), \
29 &Kokkos::Execution::GraphImpl::GraphAddNodeEvent::graph, \
31 std::get<Kokkos::Execution::GraphImpl::GraphCreateEvent>(_graph_create_event_variant_).graph)), \
32 ::testing::Field(&Kokkos::Execution::GraphImpl::GraphAddNodeEvent::predecessor, ::testing::Eq(_predecessor_)))
35#define MATCHER_FOR_GRAPH_NODE_OF(_graph_add_node_event_) \
36 std::get<Kokkos::Execution::GraphImpl::GraphAddNodeEvent>(_graph_add_node_event_).node
39#define MATCHER_FOR_GRAPH_INSTANTIATE(_graph_create_event_variant_) \
40 AGraphInstantiateEvent( \
42 &Kokkos::Execution::GraphImpl::GraphInstantiateEvent::graph, \
44 std::get<Kokkos::Execution::GraphImpl::GraphCreateEvent>(_graph_create_event_variant_).graph)))
47#define MATCHER_FOR_GRAPH_SUBMIT(_exec_, _graph_create_event_variant_) \
50 &Kokkos::Execution::GraphImpl::GraphSubmitEvent::dev_id, \
51 ::testing::Eq(Kokkos::Tools::Experimental::device_id(_exec_))), \
53 &Kokkos::Execution::GraphImpl::GraphSubmitEvent::graph, \
55 std::get<Kokkos::Execution::GraphImpl::GraphCreateEvent>(_graph_create_event_variant_).graph)))
59template <Kokkos::ExecutionSpace Exec>
68 return event.name !=
"Kokkos::DefaultGraph::submit: fencing before launching graph nodes"
69 &&
event.name !=
"Kokkos::DefaultGraphNode::execute_node: sync with predecessors"
70 &&
event.name !=
"Kokkos::GraphImpl::~GraphImpl: Graph Destruction";
73 template <Kokkos::utils::callbacks::Event EventType>
#define DEFINE_EVENT_MATCHER_IN(__namespace__, __eventtype__)
Similar to EventDiscardMatcher, for graph-related events.
constexpr bool operator()(const EventType &) const
constexpr bool operator()(const Kokkos::utils::callbacks::BeginFenceEvent &event) const