kokkos-execution 0.0.1
Loading...
Searching...
No Matches
test_continues_on.cpp
Go to the documentation of this file.
2PRAGMA_DIAGNOSTIC_PUSH
4#include "exec/single_thread_context.hpp"
5PRAGMA_DIAGNOSTIC_POP
6
10
12
25
37
38namespace Tests::GraphImpl {
39
40using namespace Kokkos::utils::callbacks;
41
62
65 using schd_sndr_t = typename TEST_CATEGORY(ContinuesOnTest)::schedule_sender_t;
66
68
69 static_assert(stdexec::__nothrow_connectable<schedule_from_sndr_t, Tests::Utils::SinkReceiver>);
70 static_assert(stdexec::__nothrow_connectable<const schedule_from_sndr_t&, Tests::Utils::SinkReceiver>);
71
72 return true;
73}
74static_assert(test_schedule_from_sndr_traits());
75
78 using schd_sndr_t = typename TEST_CATEGORY(ContinuesOnTest)::schedule_sender_t;
79
80 using continues_on_sndr_t = Kokkos::Execution::GraphImpl::ContinuesOnSender<
81 typename TEST_CATEGORY(ContinuesOnTest)::scheduler_t,
82 schd_sndr_t
83 >;
84
85 static_assert(stdexec::__nothrow_connectable<continues_on_sndr_t, Tests::Utils::SinkReceiver>);
86 static_assert(stdexec::__nothrow_connectable<const continues_on_sndr_t&, Tests::Utils::SinkReceiver>);
87
89
90 static_assert(
91 std::same_as<
92 stdexec::connect_result_t<continues_on_sndr_t&&, typename TEST_CATEGORY(ContinuesOnTest)::sync_wait_rcvr_t>,
94 typename TEST_CATEGORY(ContinuesOnTest)::scheduler_t,
95 typename TEST_CATEGORY(ContinuesOnTest)::schedule_sender_t,
96 typename TEST_CATEGORY(ContinuesOnTest)::sync_wait_rcvr_t
97 >
98 >);
99 static_assert(std::same_as<
100 stdexec::connect_result_t<
101 const continues_on_sndr_t&,
102 typename TEST_CATEGORY(ContinuesOnTest)::sync_wait_rcvr_t
103 >,
105 typename TEST_CATEGORY(ContinuesOnTest)::scheduler_t const &,
106 typename TEST_CATEGORY(ContinuesOnTest)::schedule_sender_t const &,
107 typename TEST_CATEGORY(ContinuesOnTest)::sync_wait_rcvr_t
108 >
109 >);
110
111 return true;
112}
113static_assert(test_continues_on_sndr_traits());
114
116consteval bool test_sndr_nothrow_transformable() {
117 using continues_on_sndr_t =
118 decltype(stdexec::just() | stdexec::continues_on(std::declval<typename TEST_CATEGORY(ContinuesOnTest)::scheduler_t>()));
119
120 static_assert(std::same_as<
121 stdexec::__demangle_t<continues_on_sndr_t>,
123 stdexec::continues_on_t,
124 typename TEST_CATEGORY(ContinuesOnTest)::scheduler_t,
125 Tests::Utils::basic_sender_t<
126 stdexec::schedule_from_t,
127 stdexec::__,
128 Tests::Utils::basic_sender_t<stdexec::just_t, stdexec::__tuple<>>
129 >
130 >
131 >);
132
133 static_assert(stdexec::__detail::__has_nothrow_transform_sender<
135 stdexec::set_value_t,
136 continues_on_sndr_t&&,
137 stdexec::env<>
138 >);
139
140 using schedule_from_sndr_t = decltype(stdexec::schedule_from(
141 stdexec::schedule(std::declval<typename TEST_CATEGORY(ContinuesOnTest)::scheduler_t>())));
142
143 static_assert(std::same_as<
144 stdexec::__demangle_t<schedule_from_sndr_t>,
146 stdexec::schedule_from_t,
147 stdexec::__,
148 typename TEST_CATEGORY(ContinuesOnTest)::schedule_sender_t
149 >
150 >);
151
152 static_assert(stdexec::__detail::__has_nothrow_transform_sender<
154 stdexec::set_value_t,
155 schedule_from_sndr_t&&,
156 stdexec::env<>
157 >);
158
159 return true;
160}
161static_assert(test_sndr_nothrow_transformable());
162
167TEST_F(TEST_CATEGORY(ContinuesOnTest), then_continues_on_single_thread_context_continues_on_then) {
168 const view_s_t data(Kokkos::view_alloc(exec, "data - shared space"));
169
170 const context_t gctx{exec};
171 experimental::execution::single_thread_context stc{};
172
174
175 auto sndr = stdexec::schedule(gctx.get_scheduler())
176 | stdexec::then(functor_t{.prev = 0, .value = 4, .data = data.data()})
177 | stdexec::continues_on(stc.get_scheduler()) | stdexec::continues_on(gctx.get_scheduler())
178 | stdexec::then(functor_t{.prev = 4, .value = 3, .data = data.data()});
179
180 using inner_sndr_t = Tests::Utils::basic_sender_t<
181 stdexec::continues_on_t,
184 stdexec::schedule_from_t,
185 stdexec::__,
187 stdexec::continues_on_t,
188 stdexec::run_loop::scheduler,
190 stdexec::schedule_from_t,
191 stdexec::__,
193 stdexec::then_t,
194 functor_t,
196 >
197 >
198 >
199 >
200 >;
201
202 using transform_sender_result_t =
203 stdexec::transform_sender_result_t<decltype(sndr), stdexec::env_of_t<sync_wait_rcvr_t>>;
204 static_assert(std::same_as<
205 stdexec::__demangle_t<transform_sender_result_t>,
207 >);
208
209 using connect_result_t = stdexec::connect_result_t<decltype(sndr), sync_wait_rcvr_t>;
210 static_assert(std::same_as<
211 stdexec::__demangle_t<connect_result_t>,
213 inner_sndr_t,
216 >
217 >);
218
219 ASSERT_EQ(data(), 0) << "Eager execution is not allowed.";
220
222
223 const auto recorded_events = Tests::Utils::record_sync_wait<recorder_listener_t>(
224 std::move(sndr)); // NOLINT(performance-move-const-arg)
225
226 ASSERT_THAT(
227 recorded_events,
228 testing::ElementsAre(
231 recorded_events.at(0), device_handle, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(0))),
234 recorded_events.at(2), device_handle, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(2))),
235 MATCHER_FOR_GRAPH_SUBMIT(exec, recorded_events.at(0)),
237 MATCHER_FOR_GRAPH_SUBMIT(exec, recorded_events.at(2)),
239
240 ASSERT_EQ(data(), 7);
241}
242
248TEST_F(TEST_CATEGORY(ContinuesOnTest), transition_to_same_graph_scheduler_instance) {
249 const view_s_t data(Kokkos::view_alloc(exec, "data - shared space"));
250
251 const context_t gctx{exec};
252
254
255 auto sndr = stdexec::schedule(gctx.get_scheduler())
256 | stdexec::then(functor_t{.prev = 0, .value = 4, .data = data.data()})
257 | stdexec::continues_on(gctx.get_scheduler())
258 | stdexec::then(functor_t{.prev = 4, .value = 3, .data = data.data()});
259
260 ASSERT_EQ(data(), 0) << "Eager execution is not allowed.";
261
262 const auto recorded_events = Tests::Utils::record_sync_wait<recorder_listener_t>(
263 std::move(sndr)); // NOLINT(performance-move-const-arg)
264
265 ASSERT_THAT(
266 recorded_events,
267 testing::ElementsAre(
270 recorded_events.at(0), device_handle, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(0))),
273 recorded_events.at(2), device_handle, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(2))),
274 MATCHER_FOR_GRAPH_SUBMIT(exec, recorded_events.at(0)),
275 MATCHER_FOR_GRAPH_SUBMIT(exec, recorded_events.at(2)),
277
278 ASSERT_EQ(data(), 7);
279}
280
289TEST_F(TEST_CATEGORY(ContinuesOnTest), transition_to_another_graph_scheduler_instance_same_type) {
290 const view_s_t data(Kokkos::view_alloc(exec, "data - shared space"));
291
292 const auto [exec_A, exec_B] = Kokkos::Experimental::partition_space(exec, 1, 1);
293
294 Tests::Utils::show_exec_space_id(exec_A, "exec_A");
295 Tests::Utils::show_exec_space_id(exec_B, "exec_B");
296
297 const context_t gctx_A{exec_A}, gctx_B{exec_B};
298 const device_handle_t device_handle_A{exec_A}, device_handle_B{exec_B};
299
301
302 auto sndr = stdexec::schedule(gctx_A.get_scheduler())
303 | stdexec::then(functor_t{.prev = 0, .value = 4, .data = data.data()})
304 | stdexec::continues_on(gctx_B.get_scheduler())
305 | stdexec::then(functor_t{.prev = 4, .value = 3, .data = data.data()});
306
307 ASSERT_EQ(data(), 0) << "Eager execution is not allowed.";
308
309 const auto recorded_events = Tests::Utils::record_sync_wait<recorder_listener_t>(
310 std::move(sndr)); // NOLINT(performance-move-const-arg)
311
313 ASSERT_THAT(
314 recorded_events,
315 testing::ElementsAre(
316 MATCHER_FOR_GRAPH_CREATE(device_handle_A),
318 recorded_events.at(0), device_handle_A, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(0))),
319 MATCHER_FOR_GRAPH_CREATE(device_handle_B),
321 recorded_events.at(2), device_handle_B, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(2))),
322 MATCHER_FOR_GRAPH_SUBMIT(exec_A, recorded_events.at(0)),
324 MATCHER_FOR_WAIT_EXEC_EVENT(exec_B, recorded_events.at(5)),
325 MATCHER_FOR_GRAPH_SUBMIT(exec_B, recorded_events.at(2)),
326 MATCHER_FOR_BEGIN_FENCE(exec_B, dispatch_label(exec_B, "sync_wait"))));
327 } else {
328 if (Tests::Utils::are_same_instances(exec_A, exec_B)) {
329 ASSERT_THAT(
330 recorded_events,
331 testing::ElementsAre(
332 MATCHER_FOR_GRAPH_CREATE(device_handle_A),
334 recorded_events.at(0), device_handle_A, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(0))),
335 MATCHER_FOR_GRAPH_CREATE(device_handle_B),
337 recorded_events.at(2), device_handle_B, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(2))),
338 MATCHER_FOR_GRAPH_SUBMIT(exec_A, recorded_events.at(0)),
339 MATCHER_FOR_GRAPH_SUBMIT(exec_B, recorded_events.at(2)),
340 MATCHER_FOR_BEGIN_FENCE(exec_B, dispatch_label(exec_B, "sync_wait"))));
341 } else {
342 ASSERT_THAT(
343 recorded_events,
344 testing::ElementsAre(
345 MATCHER_FOR_GRAPH_CREATE(device_handle_A),
347 recorded_events.at(0), device_handle_A, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(0))),
348 MATCHER_FOR_GRAPH_CREATE(device_handle_B),
350 recorded_events.at(2), device_handle_B, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(2))),
351 MATCHER_FOR_GRAPH_SUBMIT(exec_A, recorded_events.at(0)),
352 MATCHER_FOR_BEGIN_FENCE(exec_A, dispatch_label(exec_A, "dependency")),
353 MATCHER_FOR_GRAPH_SUBMIT(exec_B, recorded_events.at(2)),
354 MATCHER_FOR_BEGIN_FENCE(exec_B, dispatch_label(exec_B, "sync_wait"))));
355 }
356 }
357
358 ASSERT_EQ(data(), 7);
359}
360
370TEST_F(TEST_CATEGORY(ContinuesOnTest), transition_to_another_graph_scheduler_instance_and_back_same_type) {
371 const view_s_t data(Kokkos::view_alloc(exec, "data - shared space"));
372
373 const auto [exec_A, exec_B] = Kokkos::Experimental::partition_space(exec, 1, 1);
374
375 Tests::Utils::show_exec_space_id(exec_A, "exec_A");
376 Tests::Utils::show_exec_space_id(exec_B, "exec_B");
377
378 const context_t gctx_A{exec_A}, gctx_B{exec_B};
379 const device_handle_t device_handle_A{exec_A}, device_handle_B{exec_B};
380
382
383 auto sndr = stdexec::schedule(gctx_A.get_scheduler())
384 | stdexec::then(functor_t{.prev = 0, .value = 4, .data = data.data()})
385 | stdexec::continues_on(gctx_B.get_scheduler())
386 | stdexec::then(functor_t{.prev = 4, .value = 3, .data = data.data()})
387 | stdexec::continues_on(gctx_A.get_scheduler())
388 | stdexec::then(functor_t{.prev = 7, .value = 2, .data = data.data()});
389
390 ASSERT_EQ(data(), 0) << "Eager execution is not allowed.";
391
392 const auto recorded_events = Tests::Utils::record_sync_wait<recorder_listener_t>(
393 std::move(sndr)); // NOLINT(performance-move-const-arg)
394
396 ASSERT_THAT(recorded_events, testing::SizeIs(14));
397 ASSERT_THAT(
398 recorded_events,
399 testing::ElementsAre(
400 MATCHER_FOR_GRAPH_CREATE(device_handle_A),
402 recorded_events.at(0), device_handle_A, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(0))),
403 MATCHER_FOR_GRAPH_CREATE(device_handle_B),
405 recorded_events.at(2), device_handle_B, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(2))),
406 MATCHER_FOR_GRAPH_CREATE(device_handle_A),
408 recorded_events.at(4), device_handle_A, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(4))),
409 MATCHER_FOR_GRAPH_SUBMIT(exec_A, recorded_events.at(0)),
411 MATCHER_FOR_WAIT_EXEC_EVENT(exec_B, recorded_events.at(7)),
412 MATCHER_FOR_GRAPH_SUBMIT(exec_B, recorded_events.at(2)),
414 MATCHER_FOR_WAIT_EXEC_EVENT(exec_A, recorded_events.at(10)),
415 MATCHER_FOR_GRAPH_SUBMIT(exec_A, recorded_events.at(4)),
416 MATCHER_FOR_BEGIN_FENCE(exec_A, dispatch_label(exec_A, "sync_wait"))));
417 } else {
418 if (Tests::Utils::are_same_instances(exec_A, exec_B)) {
419 ASSERT_THAT(
420 recorded_events,
421 testing::ElementsAre(
422 MATCHER_FOR_GRAPH_CREATE(device_handle_A),
424 recorded_events.at(0), device_handle_A, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(0))),
425 MATCHER_FOR_GRAPH_CREATE(device_handle_B),
427 recorded_events.at(2), device_handle_B, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(2))),
428 MATCHER_FOR_GRAPH_CREATE(device_handle_A),
430 recorded_events.at(4), device_handle_A, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(4))),
431 MATCHER_FOR_GRAPH_SUBMIT(exec_A, recorded_events.at(0)),
432 MATCHER_FOR_GRAPH_SUBMIT(exec_B, recorded_events.at(2)),
433 MATCHER_FOR_GRAPH_SUBMIT(exec_A, recorded_events.at(4)),
434 MATCHER_FOR_BEGIN_FENCE(exec_A, dispatch_label(exec_A, "sync_wait"))));
435 } else {
436 ASSERT_THAT(recorded_events, testing::SizeIs(12));
437 ASSERT_THAT(
438 recorded_events,
439 testing::ElementsAre(
440 MATCHER_FOR_GRAPH_CREATE(device_handle_A),
442 recorded_events.at(0), device_handle_A, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(0))),
443 MATCHER_FOR_GRAPH_CREATE(device_handle_B),
445 recorded_events.at(2), device_handle_B, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(2))),
446 MATCHER_FOR_GRAPH_CREATE(device_handle_A),
448 recorded_events.at(4), device_handle_A, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(4))),
449 MATCHER_FOR_GRAPH_SUBMIT(exec_A, recorded_events.at(0)),
450 MATCHER_FOR_BEGIN_FENCE(exec_A, dispatch_label(exec_A, "dependency")),
451 MATCHER_FOR_GRAPH_SUBMIT(exec_B, recorded_events.at(2)),
452 MATCHER_FOR_BEGIN_FENCE(exec_B, dispatch_label(exec_B, "dependency")),
453 MATCHER_FOR_GRAPH_SUBMIT(exec_A, recorded_events.at(4)),
454 MATCHER_FOR_BEGIN_FENCE(exec_A, dispatch_label(exec_A, "sync_wait"))));
455 }
456 }
457
458 ASSERT_EQ(data(), 9);
459}
460
462TEST_F(TEST_CATEGORY(ContinuesOnTest), transition_to_another_graph_scheduler_instance_and_back_different_type) {
463 const view_s_t data(Kokkos::view_alloc(exec, "data - shared space"));
464
465 const Kokkos::DefaultHostExecutionSpace exec_h{};
466
467 const Kokkos::Execution::GraphContext gctx_h{exec_h};
468 const context_t gctx{exec};
469
470 const auto device_handle_h = Kokkos::Experimental::get_device_handle(exec_h);
471
474
475 auto sndr = stdexec::schedule(gctx.get_scheduler())
476 | stdexec::then(functor_device_t{.prev = 0, .value = 4, .data = data.data()})
477 | stdexec::continues_on(gctx_h.get_scheduler())
478 | stdexec::then(functor_host_t{.prev = 4, .value = 3, .data = data.data()})
479 | stdexec::continues_on(gctx.get_scheduler())
480 | stdexec::then(functor_device_t{.prev = 7, .value = 2, .data = data.data()});
481
482 ASSERT_EQ(data(), 0) << "Eager execution is not allowed.";
483
484 const auto recorded_events = Tests::Utils::record_sync_wait<recorder_listener_t>(
485 std::move(sndr)); // NOLINT(performance-move-const-arg)
486
488 ASSERT_THAT(
489 recorded_events,
490 testing::ElementsAre(
493 recorded_events.at(0), device_handle, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(0))),
494 MATCHER_FOR_GRAPH_CREATE(device_handle_h),
496 recorded_events.at(2), device_handle_h, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(2))),
499 recorded_events.at(4), device_handle, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(4))),
500 MATCHER_FOR_GRAPH_SUBMIT(exec, recorded_events.at(0)),
501 MATCHER_FOR_GRAPH_SUBMIT(exec_h, recorded_events.at(2)),
502 MATCHER_FOR_GRAPH_SUBMIT(exec, recorded_events.at(4)),
504 } else if constexpr (
506 && std::same_as<Kokkos::DefaultHostExecutionSpace, TEST_EXECUTION_SPACE>) {
507 ASSERT_THAT(
508 recorded_events,
509 testing::ElementsAre(
512 recorded_events.at(0), device_handle, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(0))),
513 MATCHER_FOR_GRAPH_CREATE(device_handle_h),
515 recorded_events.at(2), device_handle_h, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(2))),
518 recorded_events.at(4), device_handle, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(4))),
519 MATCHER_FOR_GRAPH_SUBMIT(exec, recorded_events.at(0)),
521 MATCHER_FOR_WAIT_EXEC_EVENT(exec_h, recorded_events.at(7)),
522 MATCHER_FOR_GRAPH_SUBMIT(exec_h, recorded_events.at(2)),
524 MATCHER_FOR_WAIT_EXEC_EVENT(exec, recorded_events.at(10)),
525 MATCHER_FOR_GRAPH_SUBMIT(exec, recorded_events.at(4)),
527 } else {
528 ASSERT_THAT(
529 recorded_events,
530 testing::ElementsAre(
533 recorded_events.at(0), device_handle, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(0))),
534 MATCHER_FOR_GRAPH_CREATE(device_handle_h),
536 recorded_events.at(2), device_handle_h, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(2))),
539 recorded_events.at(4), device_handle, MATCHER_FOR_GRAPH_ROOT_NODE_OF(recorded_events.at(4))),
540 MATCHER_FOR_GRAPH_SUBMIT(exec, recorded_events.at(0)),
542 MATCHER_FOR_GRAPH_SUBMIT(exec_h, recorded_events.at(2)),
543 MATCHER_FOR_BEGIN_FENCE(exec_h, dispatch_label(exec_h, "dependency")),
544 MATCHER_FOR_GRAPH_SUBMIT(exec, recorded_events.at(4)),
546 }
547
548 ASSERT_EQ(data(), 9);
549}
550
551} // namespace Tests::GraphImpl
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_)
#define TEST_CATEGORY(_name_)
Definition category.hpp:10
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::GraphAddNodeEvent, Kokkos::Execution::GraphImpl::GraphCreateEvent, Kokkos::Execution::GraphImpl::GraphInstantiateEvent, Kokkos::Execution::GraphImpl::GraphSubmitEvent > recorder_listener_t
Kokkos::Execution::Impl::SyncWait::Receiver< TEST_EXECUTION_SPACE, std::true_type > sync_wait_rcvr_t
Determine if the Kokkos backend can enqueue a wait for an event into an execution space instance.
#define KOKKOS_EXECUTION_THREADS_THROWS_ON_SYNC_WAIT_ASSERT_AND_SKIP(_sndr_)
Definition context.hpp:69
#define KOKKOS_EXECUTION_STDEXEC_PRAGMA_DIAGNOSTIC_IGNORED
Basic list of ignored diagnostics when including anything from stdexec.
consteval bool test_continues_on_sndr_traits()
consteval bool test_schedule_from_sndr_traits()
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
consteval bool check_continues_on()
Check how the scheduler customizes stdexec::continues_on.
void show_exec_space_id(const Exec &exec, std::string_view label="", std::ostream &out=std::cout)
Definition kokkos.hpp:33
bool are_same_instances(const Exec &exec, const OtherExec &other_exec)
Definition kokkos.hpp:13
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
Operation state for stdexec::continues_on.
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
Operation state that adds all closures as a sequence of nodes.
Sender for stdexec::then.
Definition then.hpp:51
Event to be sent to Kokkos::utils::callbacks::dispatch when calling record.
Definition event.hpp:54
Receiver for stdexec::sync_wait.
Definition sync_wait.hpp:46
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
decltype(std::declval< const context_t >().get_scheduler()) scheduler_t
Definition context.hpp:28
decltype(stdexec::schedule(std::declval< scheduler_t >())) schedule_sender_t
Definition context.hpp:29
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
#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_ROOT_NODE_OF(_graph_create_event_)
Definition events.hpp:47