kokkos-execution 0.0.1
Loading...
Searching...
No Matches
Kokkos::Execution::Impl Namespace Reference

Namespaces

namespace  SyncWait

Classes

struct  ForwardingAttributes
 Filter queries on a sender to allow forwarding queries only. More...
struct  BulkTraits
 Extract the policy, shape and functor type of bulk data. More...
struct  BulkTraits< stdexec::__bulk::__data< Policy, Shape, Functor > >
struct  RequiresSync
struct  DeferredCompletionReceiverTag
struct  SyncPolicy
struct  CompletionSignal
struct  CompletionSignal< SyncPolicy::InlineFenceExec, Exec, Rcvr >
 Fence the execution space instance to complete the operation and call set_value on the receiver. More...
struct  ScheduleWaitEventReceiver
struct  CompletionSignal< SyncPolicy::ScheduleWaitEvent, Exec, Rcvr >
 Create an event in the execution space instance, and schedule on the delegation scheduler a task that waits on this event and then calls set_value on the receiver. More...
struct  CompletionSignal< SyncPolicy::PassThrough, Exec, Rcvr >
struct  CompletionSignal< SyncPolicy::DeferWaitEvent, Exec, Rcvr >
 Create an event in the execution space instance, and pass a handle to the event to the receiver, thus deferring to the successor the responsibility to wait on the event. More...
struct  HasNonBlockingDispatch< Kokkos::Cuda >
struct  Event< Kokkos::Cuda >
struct  FixedString
struct  ApplySender
struct  TransformSender
struct  Event
 An event that can be recorded on an execution space instance. More...
struct  HasNonBlockingDispatch
 Determine if the Kokkos backend has non-blocking dispatch. More...
struct  RecordEvent
 Event to be sent to Kokkos::utils::callbacks::dispatch when calling record. More...
struct  WaitEvent
 Event to be sent to Kokkos::utils::callbacks::dispatch when calling wait. More...
struct  get_exec_t
struct  ExecutionSpaceRef
 Wrap a Kokkos execution space to make it cheap to copy/move in new environments. More...
struct  HasNonBlockingDispatch< Kokkos::HIP >
struct  Event< Kokkos::HIP >
struct  HasNonBlockingDispatch< Kokkos::Experimental::HPX >
struct  Event< Kokkos::Experimental::HPX >
struct  Immovable
 Immovable type. More...
struct  MakeOpState
class  OptionalStorage
 Data structure that has an interface similar to std::optional but stores the value with stdexec::__manual_lifetime. More...
struct  Receiver
 Receiver for an object parent_op that implements complete. More...
struct  State
struct  HasNonBlockingDispatch< Kokkos::SYCL >
struct  Event< Kokkos::SYCL >
struct  ParallelForSender
struct  ParallelForData

Concepts

concept  has_parallel_policy
 See https://github.com/NVIDIA/stdexec/blob/16076a81efa4477513e6ede9c2741fd034ecef99/include/stdexec/__detail/__bulk.hpp#L100.
concept  deferred_completion_receiver
concept  event
 Constrain an EventType type to be a valid event type for Exec execution space type.
concept  has_non_blocking_dispatch
concept  dispatching_sender
 Concept that constrains the type of a sender that dispatches a functor for execution.

Typedefs

template<typename Data>
using bulk_traits = BulkTraits<std::remove_cvref_t<Data>>
template<Kokkos::ExecutionSpace Exec>
using event_storage_t = std::optional<Event<Exec>>
template<typename Env>
using delegation_scheduler_of_t = stdexec::__query_result_t<const Env&, stdexec::get_delegation_scheduler_t>
template<typename Tag, stdexec::sender Sndr, typename... Env>
using completion_scheduler_of_t
 Retrieve the completion scheduler for a given completion tag.
template<typename Sndr, typename... Env>
using exec_of_t = typename completion_scheduler_of_t<stdexec::set_value_t, Sndr, Env...>::execution_space
 Type of the execution space extracted from a sender's completion scheduler.

Functions

template<>
void impl_wait (const Kokkos::Cuda &exec, const Event< Kokkos::Cuda > &event)
template<Kokkos::ExecutionSpace Exec, FixedString Suffix>
consteval std::string_view dispatch_label () noexcept
 View the dispatch label as a std::string_view.
template<Kokkos::ExecutionSpace Exec>
void record_event (const Exec &exec, uint64_t &event_id)
template<Kokkos::ExecutionSpace Exec>
void wait_event (const Event< Exec > &event)
template<Kokkos::ExecutionSpace ExecTo, Kokkos::ExecutionSpace ExecFrom>
void wait_event (const ExecTo &exec, const Event< ExecFrom > &event)
template<Kokkos::ExecutionSpace Exec>
void record (Event< Exec > &event, const Exec &exec)
 Record event on exec.
template<Kokkos::ExecutionSpace Exec>
void wait (const Event< Exec > &event)
 Wait for event to complete.
template<Kokkos::ExecutionSpace ExecFrom, Kokkos::ExecutionSpace ExecTo>
void impl_wait (const ExecTo &, const Event< ExecFrom > &event)
template<Kokkos::ExecutionSpace ExecFrom, Kokkos::ExecutionSpace ExecTo>
void wait (const ExecTo &exec, const Event< ExecFrom > &event)
 The operations enqueued from the calling thread into exec cannot start before the event event completes.
template<>
void impl_wait (const Kokkos::HIP &exec, const Event< Kokkos::HIP > &event)
template<>
void impl_wait (const Kokkos::SYCL &exec, const Event< Kokkos::SYCL > &event)

Variables

template<Kokkos::ExecutionSpace Exec, FixedString Suffix>
static constexpr auto dispatch_label_v
 Get the dispatch label from Exec and Suffix.
static constexpr auto invalid_dev_id = Kokkos::Experimental::finite_max_v<uint32_t>
static constexpr auto invalid_event_id = Kokkos::Experimental::finite_max_v<uint64_t>
constexpr get_exec_t get_exec {}

Typedef Documentation

◆ bulk_traits

template<typename Data>
using Kokkos::Execution::Impl::bulk_traits = BulkTraits<std::remove_cvref_t<Data>>

Definition at line 26 of file bulk.hpp.

◆ completion_scheduler_of_t

template<typename Tag, stdexec::sender Sndr, typename... Env>
using Kokkos::Execution::Impl::completion_scheduler_of_t
Initial value:
std::invoke_result_t<stdexec::get_completion_scheduler_t<Tag>, stdexec::env_of_t<Sndr>, Env...>

Retrieve the completion scheduler for a given completion tag.

It is heavily inspired, yet different from https://github.com/NVIDIA/stdexec/blob/45c0f5803c190366a8529833901d1f6340b40d2e/include/stdexec/__detail/__schedulers.hpp#L395-L398.

While stdexec::__completion_scheduler_of_t is constrained to a sender that "sends", this version does not and returns what a genuine call to stdexec::get_completion_scheduler would.

Definition at line 18 of file sender_introspection.hpp.

◆ delegation_scheduler_of_t

template<typename Env>
using Kokkos::Execution::Impl::delegation_scheduler_of_t = stdexec::__query_result_t<const Env&, stdexec::get_delegation_scheduler_t>

Definition at line 9 of file schedulers.hpp.

◆ event_storage_t

template<Kokkos::ExecutionSpace Exec>
using Kokkos::Execution::Impl::event_storage_t = std::optional<Event<Exec>>

Definition at line 167 of file event.hpp.

◆ exec_of_t

template<typename Sndr, typename... Env>
using Kokkos::Execution::Impl::exec_of_t = typename completion_scheduler_of_t<stdexec::set_value_t, Sndr, Env...>::execution_space

Type of the execution space extracted from a sender's completion scheduler.

Definition at line 23 of file sender_introspection.hpp.

Function Documentation

◆ dispatch_label()

template<Kokkos::ExecutionSpace Exec, FixedString Suffix>
std::string_view Kokkos::Execution::Impl::dispatch_label ( )
constevalnoexcept

View the dispatch label as a std::string_view.

Definition at line 47 of file dispatch_label.hpp.

References dispatch_label_v.

◆ impl_wait() [1/4]

template<Kokkos::ExecutionSpace ExecFrom, Kokkos::ExecutionSpace ExecTo>
void Kokkos::Execution::Impl::impl_wait ( const ExecTo & ,
const Event< ExecFrom > & event )

Definition at line 151 of file event.hpp.

◆ impl_wait() [2/4]

template<>
void Kokkos::Execution::Impl::impl_wait ( const Kokkos::Cuda & exec,
const Event< Kokkos::Cuda > & event )

Definition at line 48 of file event.hpp.

◆ impl_wait() [3/4]

template<>
void Kokkos::Execution::Impl::impl_wait ( const Kokkos::HIP & exec,
const Event< Kokkos::HIP > & event )

Definition at line 48 of file event.hpp.

◆ impl_wait() [4/4]

template<>
void Kokkos::Execution::Impl::impl_wait ( const Kokkos::SYCL & exec,
const Event< Kokkos::SYCL > & event )

Definition at line 45 of file event.hpp.

◆ record()

template<Kokkos::ExecutionSpace Exec>
void Kokkos::Execution::Impl::record ( Event< Exec > & event,
const Exec & exec )

Record event on exec.

Definition at line 138 of file event.hpp.

References record_event().

◆ record_event()

template<Kokkos::ExecutionSpace Exec>
void Kokkos::Execution::Impl::record_event ( const Exec & exec,
uint64_t & event_id )

◆ wait() [1/2]

template<Kokkos::ExecutionSpace Exec>
void Kokkos::Execution::Impl::wait ( const Event< Exec > & event)

Wait for event to complete.

Definition at line 145 of file event.hpp.

References wait_event().

◆ wait() [2/2]

template<Kokkos::ExecutionSpace ExecFrom, Kokkos::ExecutionSpace ExecTo>
void Kokkos::Execution::Impl::wait ( const ExecTo & exec,
const Event< ExecFrom > & event )

The operations enqueued from the calling thread into exec cannot start before the event event completes.

Note
Backends should specialize impl_wait.

Definition at line 161 of file event.hpp.

References impl_wait(), and wait_event().

◆ wait_event() [1/2]

template<Kokkos::ExecutionSpace Exec>
void Kokkos::Execution::Impl::wait_event ( const Event< Exec > & event)

Definition at line 85 of file event.hpp.

References Kokkos::utils::callbacks::dispatch(), and invalid_dev_id.

◆ wait_event() [2/2]

template<Kokkos::ExecutionSpace ExecTo, Kokkos::ExecutionSpace ExecFrom>
void Kokkos::Execution::Impl::wait_event ( const ExecTo & exec,
const Event< ExecFrom > & event )

Definition at line 92 of file event.hpp.

References Kokkos::utils::callbacks::dispatch().

Variable Documentation

◆ dispatch_label_v

template<Kokkos::ExecutionSpace Exec, FixedString Suffix>
auto Kokkos::Execution::Impl::dispatch_label_v
staticconstexpr
Initial value:
= [] {
constexpr auto prefix = Kokkos::Impl::TypeInfo<Exec>::name();
std::array<char, prefix.size() + Suffix.size() + 1> buf{};
auto iter = buf.begin();
for (auto charac: prefix)
*iter++ = charac;
for (auto charac: Suffix)
*iter++ = charac;
return buf;
}()

Get the dispatch label from Exec and Suffix.

Definition at line 34 of file dispatch_label.hpp.

◆ get_exec

get_exec_t Kokkos::Execution::Impl::get_exec {}
inlineconstexpr

Definition at line 17 of file get_exec.hpp.

◆ invalid_dev_id

auto Kokkos::Execution::Impl::invalid_dev_id = Kokkos::Experimental::finite_max_v<uint32_t>
staticconstexpr

Definition at line 48 of file event.hpp.

◆ invalid_event_id

auto Kokkos::Execution::Impl::invalid_event_id = Kokkos::Experimental::finite_max_v<uint64_t>
staticconstexpr

Definition at line 49 of file event.hpp.