29using namespace Kokkos::utils::callbacks;
49TEST_F(
OnTest, on_same_execution_space_instance) {
61 ASSERT_EQ(data(), 0) <<
"Eager execution is not allowed.";
80TEST_F(
OnTest, on_another_execution_space_instance_same_type) {
83 const auto [exec_A, exec_B] = Kokkos::Experimental::partition_space(
exec, 1, 1);
94 static_assert(stdexec::dependent_sender<
decltype(chain)>);
97 ASSERT_EQ(data(), 0) <<
"Eager execution is not allowed.";
104 testing::ElementsAre(
117 testing::ElementsAre(
125 testing::ElementsAre(
135 ASSERT_EQ(data(), 3) <<
"A synchronization is missing.";
144TEST_F(
OnTest, many_execution_space_instances_of_different_type) {
145 const view_s_t data(Kokkos::view_alloc(
exec,
"data - shared space"));
158 ASSERT_EQ(data(), 0) <<
"Eager execution is not allowed.";
165 testing::ElementsAre(
170 }
else if constexpr (
172 && std::same_as<host_execution_space, TEST_EXECUTION_SPACE>) {
175 testing::ElementsAre(
187 testing::ElementsAre(
196 ASSERT_EQ(data(), 3) <<
"A synchronization is missing.";
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_BEGIN_PFOR(_exec_, _label_)
#define MATCHER_FOR_RECORD_EVENT(_exec_)
#define MATCHER_FOR_BEGIN_FENCE(_exec_, _label_)
RecorderListener< EventDiscardMatcher< TEST_EXECUTION_SPACE >, BeginFenceEvent, BeginParallelForEvent, 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.
Kokkos::DefaultHostExecutionSpace host_execution_space
#define THEN_INCREMENT(_data_)
Add a then using Tests::Utils::Functors::Increment that may throw. // NOLINTNEXTLINE(cppcoreguideline...
constexpr check_scheduler_type_t< Tag, Schd > check_scheduler_type
auto record_sync_wait(Sndr &&sndr)
void show_exec_space_id(const Exec &exec, std::string_view label="", std::ostream &out=std::cout)
bool are_same_instances(const Exec &exec, const OtherExec &other_exec)
Matcher to filter out events that are just noise for tests.
Execution context using a Kokkos execution space under the hood.
auto get_scheduler() const noexcept -> ExecutionSpaceImpl::Scheduler< Exec >
Event to be sent to Kokkos::utils::callbacks::dispatch when calling record.
Event to be sent to Kokkos::utils::callbacks::dispatch when calling wait.
Kokkos::View< value_t, Kokkos::SharedSpace > view_s_t
Kokkos::Execution::ExecutionSpaceContext< Exec > context_t