kokkos-execution 0.0.1
Loading...
Searching...
No Matches
test_when_all.cpp
Go to the documentation of this file.
2PRAGMA_DIAGNOSTIC_PUSH
4#include "exec/single_thread_context.hpp"
5PRAGMA_DIAGNOSTIC_POP
6
10
13
27
39
40namespace Tests::GraphImpl {
41
42using namespace Kokkos::utils::callbacks;
43
69
71consteval bool test_sndr_traits() {
73 using schd_sndr_t = typename TEST_CATEGORY(WhenAllTest)::schedule_sender_t;
74
76 using functor_t = Tests::Utils::Functors::Increment<TEST_CATEGORY(WhenAllTest)::view_s_t, true>;
77 using then_sndr_t = decltype(stdexec::then(std::declval<schd_sndr_t>(), std::declval<functor_t>()));
78
80 using when_all_sndr_t = stdexec::transform_sender_result_t<
81 decltype(stdexec::when_all(std::declval<then_sndr_t>(), std::declval<then_sndr_t>())),
82 stdexec::env<>
83 >;
84
87
90
91 return true;
92}
93static_assert(test_sndr_traits());
94
96consteval bool test_sndr_nothrow_transformable() {
97 using when_all_sndr_t = decltype(stdexec::when_all(
98 stdexec::schedule(std::declval<typename TEST_CATEGORY(WhenAllTest)::scheduler_t>()),
99 stdexec::schedule(std::declval<typename TEST_CATEGORY(WhenAllTest)::scheduler_t>())
101
102 static_assert(std::same_as<
103 stdexec::__demangle_t<when_all_sndr_t>,
105 stdexec::when_all_t,
106 stdexec::__,
107 typename TEST_CATEGORY(WhenAllTest)::schedule_sender_t,
108 Tests::Utils::basic_sender_t<
109 stdexec::then_t,
110 Tests::Utils::Functors::NoOp<false, false, false>,
111 typename TEST_CATEGORY(WhenAllTest)::schedule_sender_t
112 >
113 >
114 >);
115
116 static_assert(stdexec::__detail::__has_nothrow_transform_sender<
118 stdexec::set_value_t,
119 when_all_sndr_t&&,
120 stdexec::env<>
121 >);
122
123 using when_all_maythrow_on_move_sndr_t = decltype(stdexec::when_all(
124 stdexec::schedule(std::declval<typename TEST_CATEGORY(WhenAllTest)::scheduler_t>()),
125 stdexec::schedule(std::declval<typename TEST_CATEGORY(WhenAllTest)::scheduler_t>())
127
128 static_assert(!stdexec::__detail::__has_nothrow_transform_sender<
129 Kokkos::Execution::GraphImpl::Domain,
130 stdexec::set_value_t,
131 when_all_maythrow_on_move_sndr_t&&,
132 stdexec::env<>
133 >);
134
135 return true;
136}
137static_assert(test_sndr_nothrow_transformable());
138
140consteval bool test_sndr_nothrow_connectable() {
142 static_assert(!std::is_nothrow_constructible_v<Kokkos::Experimental::Graph<TEST_EXECUTION_SPACE>>);
143
144 using when_all_sndr_t = decltype(stdexec::when_all(
145 stdexec::schedule(std::declval<typename TEST_CATEGORY(WhenAllTest)::scheduler_t>()),
146 stdexec::schedule(std::declval<typename TEST_CATEGORY(WhenAllTest)::scheduler_t>())
147 | stdexec::then(Tests::Utils::Functors::NoOp<false, false, false>{})));
148
149 static_assert(!stdexec::__nothrow_connectable<when_all_sndr_t, Tests::Utils::SinkReceiver>);
150
151 return true;
152}
153static_assert(test_sndr_nothrow_connectable());
154
159template <typename ExecA, typename ExecB>
161 if constexpr (std::same_as<ExecA, ExecB>)
162 return true;
163 else {
164 using sndr_t = stdexec::transform_sender_result_t<
165 decltype(stdexec::when_all(
166 stdexec::schedule(Kokkos::Execution::GraphContext{std::declval<ExecA>()}.get_scheduler()),
167 stdexec::schedule(Kokkos::Execution::GraphContext{std::declval<ExecB>()}.get_scheduler()))),
169 >;
170
171 static_assert(
172 std::same_as<
173 sndr_t,
174 stdexec::__not_a_sender<
175 stdexec::_WHAT_(Kokkos::Execution::GraphImpl::CANNOT_DISPATCH_THIS_ALGORITHM_TO_THE_GRAPH_SCHEDULER),
176 stdexec::_WHY_(Kokkos::Execution::GraphImpl::BECAUSE_THE_EXECUTION_SPACE_TYPE_IS_NOT_HOMOGENEOUS),
177 stdexec::_WHERE_(stdexec::_IN_ALGORITHM_, stdexec::when_all_t),
179 1,
181 >,
182 stdexec::_WITH_SENDERS_<
185 >,
186 stdexec::_WITH_ENVIRONMENT_(Tests::Utils::SinkReceiver)
187 >
188 >);
189
190 return true;
191 }
192}
193static_assert(test_sndr_cannot_mix_execution_space_type<TEST_EXECUTION_SPACE, Kokkos::DefaultHostExecutionSpace>());
194
206TEST_F(TEST_CATEGORY(WhenAllTest), schedule_sender) {
207 experimental::execution::single_thread_context stc{};
208 const context_t gctx{exec};
209
210 auto sndr = stdexec::when_all(
211 stdexec::schedule(gctx.get_scheduler()),
212 stdexec::schedule(stc.get_scheduler()) | stdexec::continues_on(gctx.get_scheduler()) | stdexec::then([]() { }));
213
215
216 const auto recorded_events = Tests::Utils::record_sync_wait<recorder_listener_t>(
217 std::move(sndr)); // NOLINT(performance-move-const-arg)
218
219 ASSERT_THAT(
220 recorded_events,
221 testing::ElementsAre(
224 recorded_events.at(0), device_handle, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(0))),
226 recorded_events.at(0),
227 MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(0)),
228 MATCHER_FOR_GRAPH_NODE_OF(recorded_events.at(1))),
229 MATCHER_FOR_GRAPH_SUBMIT(TEST_EXECUTION_SPACE{}, recorded_events.at(0)),
230 MATCHER_FOR_BEGIN_FENCE(TEST_EXECUTION_SPACE{}, dispatch_label(TEST_EXECUTION_SPACE{}, "after dispatch"))));
231}
232
245TEST_F(TEST_CATEGORY(WhenAllTest), single_branch) {
246 const view_s_t data(Kokkos::view_alloc(exec, "data - shared space"));
247
248 const context_t gctx{exec};
249
250 auto sndr = stdexec::when_all(stdexec::schedule(gctx.get_scheduler()) | THEN_INCREMENT(data));
251
252 static_assert(std::same_as<
253 decltype(stdexec::get_completion_domain<stdexec::set_value_t>(stdexec::get_env(sndr))),
255 >);
256
257 static_assert(std::same_as<stdexec::tag_of_t<decltype(sndr)>, stdexec::then_t>);
258 static_assert(Kokkos::Execution::GraphImpl::graph_completing_sender<decltype(sndr)>);
259
260 ASSERT_EQ(data(), 0) << "Eager execution is not allowed.";
261
263
264 const auto recorded_events = Tests::Utils::record_sync_wait<recorder_listener_t>(std::move(sndr));
265
266 ASSERT_THAT(
267 recorded_events,
268 testing::ElementsAre(
271 recorded_events.at(0), device_handle, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(0))),
272 MATCHER_FOR_GRAPH_SUBMIT(exec, recorded_events.at(0)),
274
275 ASSERT_EQ(data(), 1);
276}
277
288TEST_F(TEST_CATEGORY(WhenAllTest), schedule_sender_and_single_branch) {
289 const view_s_t data(Kokkos::view_alloc(exec, "data - shared space"));
290
291 const context_t gctx{exec};
292
293 auto sndr = stdexec::when_all(
294 stdexec::schedule(gctx.get_scheduler()), stdexec::schedule(gctx.get_scheduler()) | THEN_INCREMENT(data));
295
296 ASSERT_EQ(data(), 0) << "Eager execution is not allowed.";
297
299
300 const auto recorded_events = Tests::Utils::record_sync_wait<recorder_listener_t>(std::move(sndr));
301
302 ASSERT_THAT(
303 recorded_events,
304 testing::ElementsAre(
307 recorded_events.at(0), device_handle, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(0))),
309 recorded_events.at(0),
310 MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(0)),
311 MATCHER_FOR_GRAPH_NODE_OF(recorded_events.at(1))),
312 MATCHER_FOR_GRAPH_SUBMIT(TEST_EXECUTION_SPACE{}, recorded_events.at(0)),
313 MATCHER_FOR_BEGIN_FENCE(TEST_EXECUTION_SPACE{}, dispatch_label(TEST_EXECUTION_SPACE{}, "after dispatch"))));
314
315 ASSERT_EQ(data(), 1);
316}
317
328TEST_F(TEST_CATEGORY(WhenAllTest), two_branches) {
329 const view_s_t data(Kokkos::view_alloc(exec, "data - shared space"));
330
331 const context_t gctx{exec};
332
333 auto branch_a = stdexec::schedule(gctx.get_scheduler()) | THEN_INCREMENT_ATOMIC(Device, data);
334 auto branch_b = stdexec::schedule(gctx.get_scheduler()) | THEN_INCREMENT_ATOMIC(Device, data);
335
336 auto sndr = stdexec::when_all(std::move(branch_a), std::move(branch_b));
337
338 ASSERT_EQ(data(), 0) << "Eager execution is not allowed.";
339
341
342 const auto recorded_events = Tests::Utils::record_sync_wait<recorder_listener_t>(std::move(sndr));
343
344 ASSERT_THAT(
345 recorded_events,
346 testing::ElementsAre(
349 recorded_events.at(0), device_handle, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(0))),
351 recorded_events.at(0), device_handle, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(0))),
353 recorded_events.at(0),
354 MATCHER_FOR_GRAPH_NODE_OF(recorded_events.at(1)),
355 MATCHER_FOR_GRAPH_NODE_OF(recorded_events.at(2))),
356 MATCHER_FOR_GRAPH_SUBMIT(TEST_EXECUTION_SPACE{}, recorded_events.at(0)),
357 MATCHER_FOR_BEGIN_FENCE(TEST_EXECUTION_SPACE{}, dispatch_label(TEST_EXECUTION_SPACE{}, "after dispatch"))));
358
359 ASSERT_EQ(data(), 2);
360}
361
374TEST_F(TEST_CATEGORY(WhenAllTest), three_branches) {
375 const view_s_t data(Kokkos::view_alloc(exec, "data - shared space"));
376
377 const context_t gctx{exec};
378
379 auto branch_a = stdexec::schedule(gctx.get_scheduler()) | THEN_INCREMENT_ATOMIC(Device, data);
380 auto branch_b = stdexec::schedule(gctx.get_scheduler()) | THEN_INCREMENT_ATOMIC(Device, data);
381 auto branch_c = stdexec::schedule(gctx.get_scheduler()) | THEN_INCREMENT_ATOMIC(Device, data);
382
383 auto sndr = stdexec::when_all(std::move(branch_a), std::move(branch_b), std::move(branch_c));
384
385 ASSERT_EQ(data(), 0) << "Eager execution is not allowed.";
386
388
389 const auto recorded_events = Tests::Utils::record_sync_wait<recorder_listener_t>(std::move(sndr));
390
391 ASSERT_THAT(
392 recorded_events,
393 testing::ElementsAre(
396 recorded_events.at(0), device_handle, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(0))),
398 recorded_events.at(0), device_handle, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(0))),
400 recorded_events.at(0), device_handle, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(0))),
402 recorded_events.at(0),
403 MATCHER_FOR_GRAPH_NODE_OF(recorded_events.at(1)),
404 MATCHER_FOR_GRAPH_NODE_OF(recorded_events.at(2)),
405 MATCHER_FOR_GRAPH_NODE_OF(recorded_events.at(3))),
406 MATCHER_FOR_GRAPH_SUBMIT(TEST_EXECUTION_SPACE{}, recorded_events.at(0)),
407 MATCHER_FOR_BEGIN_FENCE(TEST_EXECUTION_SPACE{}, dispatch_label(TEST_EXECUTION_SPACE{}, "after dispatch"))));
408
409 ASSERT_EQ(data(), 3);
410}
411
428TEST_F(TEST_CATEGORY(WhenAllTest), three_branches_starting_on_single_thread_context) {
429 const Kokkos::View<value_t[3], Kokkos::SharedSpace> data_per_branch(Kokkos::view_alloc("data - shared space"));
430
431 experimental::execution::single_thread_context stc_a{}, stc_b{}, stc_c{};
432
433 const context_t gctx{exec};
434
437
438 auto branch_a = stdexec::schedule(stc_a.get_scheduler())
439 | stdexec::then(functor_h_t{.prev = 0, .value = 2, .data = &data_per_branch(0)})
440 | stdexec::continues_on(gctx.get_scheduler())
441 | stdexec::then(functor_d_t{.prev = 2, .value = 3, .data = &data_per_branch(0)});
442 auto branch_b = stdexec::schedule(stc_b.get_scheduler())
443 | stdexec::then(functor_h_t{.prev = 0, .value = 3, .data = &data_per_branch(1)})
444 | stdexec::continues_on(gctx.get_scheduler())
445 | stdexec::then(functor_d_t{.prev = 3, .value = 4, .data = &data_per_branch(1)});
446 auto branch_c = stdexec::schedule(stc_c.get_scheduler())
447 | stdexec::then(functor_h_t{.prev = 0, .value = 4, .data = &data_per_branch(2)})
448 | stdexec::continues_on(gctx.get_scheduler())
449 | stdexec::then(functor_d_t{.prev = 4, .value = 5, .data = &data_per_branch(2)});
450
451 auto sndr = stdexec::when_all(
452 std::move(branch_a), std::move(branch_b), std::move(branch_c)); // NOLINT(performance-move-const-arg)
453
454 ASSERT_THAT(Tests::Utils::span_from(data_per_branch), testing::Each(testing::Eq(0)))
455 << "Eager execution is not " "allowed.";
456
458
460
461 const auto recorded_events = Tests::Utils::record_sync_wait<recorder_listener_t>(
462 std::move(sndr)); // NOLINT(performance-move-const-arg)
463
464 ASSERT_THAT(
465 recorded_events,
466 testing::ElementsAre(
469 recorded_events.at(0), device_handle, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(0))),
471 recorded_events.at(0), device_handle, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(0))),
473 recorded_events.at(0), device_handle, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(0))),
475 recorded_events.at(0),
476 MATCHER_FOR_GRAPH_NODE_OF(recorded_events.at(1)),
477 MATCHER_FOR_GRAPH_NODE_OF(recorded_events.at(2)),
478 MATCHER_FOR_GRAPH_NODE_OF(recorded_events.at(3))),
479 MATCHER_FOR_GRAPH_SUBMIT(TEST_EXECUTION_SPACE{}, recorded_events.at(0)),
480 MATCHER_FOR_BEGIN_FENCE(TEST_EXECUTION_SPACE{}, dispatch_label(TEST_EXECUTION_SPACE{}, "after dispatch"))));
481
482 ASSERT_THAT(Tests::Utils::span_from(data_per_branch), testing::ElementsAre(5, 7, 9));
483}
484
498TEST_F(TEST_CATEGORY(WhenAllTest), three_branches_some_starting_on_single_thread_context) {
499 const Kokkos::View<value_t[3], Kokkos::SharedSpace> data_per_branch(Kokkos::view_alloc("data - shared space"));
500
501 experimental::execution::single_thread_context stc_a{}, stc_b{};
502
503 const context_t gctx{exec};
504
507
508 auto branch_a = stdexec::schedule(stc_a.get_scheduler())
509 | stdexec::then(functor_h_t{.prev = 0, .value = 2, .data = &data_per_branch(0)})
510 | stdexec::continues_on(gctx.get_scheduler())
511 | stdexec::then(functor_d_t{.prev = 2, .value = 3, .data = &data_per_branch(0)});
512 auto branch_b = stdexec::schedule(stc_b.get_scheduler())
513 | stdexec::then(functor_h_t{.prev = 0, .value = 3, .data = &data_per_branch(1)})
514 | stdexec::continues_on(gctx.get_scheduler())
515 | stdexec::then(functor_d_t{.prev = 3, .value = 4, .data = &data_per_branch(1)});
516 auto branch_c = stdexec::schedule(gctx.get_scheduler())
517 | stdexec::then(functor_d_t{.prev = 0, .value = 4, .data = &data_per_branch(2)});
518
519 auto sndr = stdexec::when_all(
520 std::move(branch_a), std::move(branch_b), std::move(branch_c)); // NOLINT(performance-move-const-arg)
521
522 ASSERT_THAT(Tests::Utils::span_from(data_per_branch), testing::Each(testing::Eq(0)))
523 << "Eager execution is not " "allowed.";
524
526
528
529 const auto recorded_events = Tests::Utils::record_sync_wait<recorder_listener_t>(
530 std::move(sndr)); // NOLINT(performance-move-const-arg)
531
532 ASSERT_THAT(
533 recorded_events,
534 testing::ElementsAre(
537 recorded_events.at(0), device_handle, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(0))),
539 recorded_events.at(0), device_handle, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(0))),
541 recorded_events.at(0), device_handle, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(0))),
543 recorded_events.at(0),
544 MATCHER_FOR_GRAPH_NODE_OF(recorded_events.at(1)),
545 MATCHER_FOR_GRAPH_NODE_OF(recorded_events.at(2)),
546 MATCHER_FOR_GRAPH_NODE_OF(recorded_events.at(3))),
547 MATCHER_FOR_GRAPH_SUBMIT(TEST_EXECUTION_SPACE{}, recorded_events.at(0)),
548 MATCHER_FOR_BEGIN_FENCE(TEST_EXECUTION_SPACE{}, dispatch_label(TEST_EXECUTION_SPACE{}, "after dispatch"))));
549
550 ASSERT_THAT(Tests::Utils::span_from(data_per_branch), testing::ElementsAre(5, 7, 4));
551}
552
562TEST_F(TEST_CATEGORY(WhenAllTest), forwarding_env) {
563 const view_s_t data(Kokkos::view_alloc(exec, "data - shared space"));
564
565 std::atomic<size_t> count = 0;
566
567 int value;
568
569 const context_t gctx{exec};
570
571 stdexec::sender auto sndr =
572 stdexec::when_all(
573 stdexec::schedule(gctx.get_scheduler()),
574 stdexec::read_env(stdexec::get_allocator)
575 | stdexec::then([&value](auto allocator) { value = Tests::Utils::round_trip_allocate(allocator, 42); })
576 | stdexec::continues_on(gctx.get_scheduler())
578 | stdexec::write_env(stdexec::prop{stdexec::get_allocator, Tests::Utils::TrackingAllocator<int>{&count}});
579
580 ASSERT_EQ(data(), 0) << "Eager execution is not allowed.";
581
583
584 const auto recorded_events = Tests::Utils::record_sync_wait<recorder_listener_t>(std::move(sndr));
585
586 ASSERT_THAT(
587 recorded_events,
588 testing::ElementsAre(
591 recorded_events.at(0), device_handle, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(0))),
593 recorded_events.at(0),
594 MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(0)),
595 MATCHER_FOR_GRAPH_NODE_OF(recorded_events.at(1))),
596 MATCHER_FOR_GRAPH_SUBMIT(TEST_EXECUTION_SPACE{}, recorded_events.at(0)),
597 MATCHER_FOR_BEGIN_FENCE(TEST_EXECUTION_SPACE{}, dispatch_label(TEST_EXECUTION_SPACE{}, "after dispatch"))));
598
599 ASSERT_EQ(data(), 1);
600
601 ASSERT_EQ(value, 42);
602 ASSERT_EQ(count, 1);
603}
604
605} // namespace Tests::GraphImpl
constexpr std::string dispatch_label(const Exec &, Label &&label)
Get the dispatch label from Exec and label.
#define MATCHER_FOR_BEGIN_FENCE(_exec_, _label_)
#define TEST_CATEGORY(_name_)
Definition category.hpp:10
device_handle_t default_device_handle
RecorderListener< ConjunctionMatcher< EventDiscardMatcher< TEST_EXECUTION_SPACE >, GraphEventDiscardMatcher< TEST_EXECUTION_SPACE > >, BeginFenceEvent, BeginParallelForEvent, AllocateDataEvent, DeallocateDataEvent, Kokkos::Execution::Impl::RecordEvent, Kokkos::Execution::Impl::WaitEvent, Kokkos::Execution::GraphImpl::GraphAddAggregateNodeEvent, Kokkos::Execution::GraphImpl::GraphAddNodeEvent, Kokkos::Execution::GraphImpl::GraphCreateEvent, Kokkos::Execution::GraphImpl::GraphInstantiateEvent, Kokkos::Execution::GraphImpl::GraphSubmitEvent > recorder_listener_t
Concept for a sender whose completion scheduler is Kokkos::Execution::GraphImpl::Scheduler.
Concept that constrains the type of a sender that dispatches a functor for execution.
#define KOKKOS_EXECUTION_THREADS_THROWS_ON_SYNC_WAIT_ASSERT_AND_SKIP(_sndr_)
Definition context.hpp:69
#define KOKKOS_EXECUTION_TEST_UTILS_GRAPH_FENCE(_exec_)
#define KOKKOS_EXECUTION_STDEXEC_PRAGMA_DIAGNOSTIC_IGNORED
Basic list of ignored diagnostics when including anything from stdexec.
#define THEN_INCREMENT(_data_)
Add a then using Tests::Utils::Functors::Increment that may throw. // NOLINTNEXTLINE(cppcoreguideline...
Definition increment.hpp:59
#define THEN_INCREMENT_ATOMIC(_scope_, _data_)
Same as THEN_INCREMENT, using Tests::Utils::atomic_fetch_add. // NOLINTNEXTLINE(cppcoreguidelines-mac...
Definition increment.hpp:63
consteval bool test_sndr_nothrow_transformable()
Definition test_bulk.cpp:83
consteval bool test_sndr_traits()
Definition test_bulk.cpp:57
consteval bool test_sndr_nothrow_connectable()
consteval bool test_sndr_cannot_mix_execution_space_type()
typename stdexec::__basic_sender< Args... >::type basic_sender_t
See https://github.com/NVIDIA/stdexec/pull/1873#discussion_r2834863237.
Definition stdexec.hpp:12
auto record_sync_wait(Sndr &&sndr)
Definition sync_wait.hpp:14
constexpr check_rcvr_env_queryable_with_t< true, Queries... > check_rcvr_env_queryable_with
auto span_from(const ViewType &view) noexcept
Get a std::span from a rank-one Kokkos::View.
Definition kokkos.hpp:41
Execution context using Kokkos::Experimental::Graph under the hood.
Definition graph.hpp:125
auto get_scheduler() const noexcept -> GraphImpl::Scheduler< Exec >
Definition graph.hpp:134
Event to be sent to Kokkos::utils::callbacks::dispatch when a Kokkos graph aggregate node is added.
Definition events.hpp:51
Event to be sent to Kokkos::utils::callbacks::dispatch when a Kokkos graph node is added.
Definition events.hpp:36
Event to be sent to Kokkos::utils::callbacks::dispatch when a Kokkos graph is created.
Definition events.hpp:16
Event to be sent to Kokkos::utils::callbacks::dispatch when a Kokkos graph is instantiated.
Definition events.hpp:66
Event to be sent to Kokkos::utils::callbacks::dispatch when a Kokkos graph is submitted.
Definition events.hpp:77
Event to be sent to Kokkos::utils::callbacks::dispatch when calling record.
Definition event.hpp:54
Event to be sent to Kokkos::utils::callbacks::dispatch when calling wait.
Definition event.hpp:75
Similar to EventDiscardMatcher, for graph-related events.
Definition events.hpp:80
Kokkos::View< value_t, Kokkos::SharedSpace > view_s_t
Definition context.hpp:32
Load the value at data and check it is equal to prev. Then, add value to it.
Kokkos::Impl::DeviceHandle< Exec > device_handle_t
A receiver that can handle all completions and does nothing with them.
A minimal tracking allocator.
#define MATCHER_FOR_GRAPH_CREATE(_device_handle_)
Definition events.hpp:17
#define MATCHER_FOR_GRAPH_SUBMIT(_exec_, _graph_create_event_variant_)
Definition events.hpp:67
#define MATCHER_FOR_GRAPH_ADDNODE(_graph_create_event_variant_, _device_handle_, _predecessor_)
Definition events.hpp:24
#define MATCHER_FOR_GRAPH_ADD_AGGREGATE_NODE(_graph_create_event_variant_,...)
Definition events.hpp:36
#define MATCHER_FOR_GRAPH_ROOT_NODE_OF(_graph_create_event_)
Definition events.hpp:47
#define MATCHER_FOR_GRAPH_NODE_OF(_graph_add_node_event_)
Definition events.hpp:51