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

Namespaces

namespace  ContinuesOn
namespace  ScheduleFrom
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  CompletionSignal
struct  SyncPolicyTag
struct  SyncPolicy
 Under a sync policy, a terminal completion is propagated: in-flight operations must complete. More...
struct  CompletionSignal< SyncPolicy::InlineFenceExec, Exec, Rcvr >
 Fence the execution space instance to complete the operation and then invoke 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 invoke the receiver. More...
struct  SubmittedPolicyTag
struct  SubmittedPolicy
struct  CompletionSignal< SubmittedPolicy::OrderOnExec, Exec, Rcvr >
struct  CompletionSignal< SubmittedPolicy::DependOnEvent, 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  HasExecWaitEvent< Kokkos::Cuda >
struct  HasNonBlockingDispatch< Kokkos::Cuda >
struct  Event< Kokkos::Cuda >
struct  HasExecWaitEvent
struct  Dependency
 This is the default implementation. More...
struct  Dependency< Exec, Exec >
struct  FixedString
struct  ApplySender
struct  TransformSender
struct  Empty
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  ExecOf
struct  ExecOf< Sndr, Env... >
 Type of the execution space extracted from Sndr completion scheduler. More...
struct  ExecOf< T >
 Type of the execution space extracted from a get_exec_t query on T. More...
struct  ExecutionSpaceRef
 Wrap a Kokkos execution space to make it cheap to copy/move in new environments. More...
struct  HasExecWaitEvent< Kokkos::HIP >
struct  HasNonBlockingDispatch< Kokkos::HIP >
struct  Event< Kokkos::HIP >
struct  HasExecWaitEvent< Kokkos::Experimental::HPX >
struct  HasNonBlockingDispatch< Kokkos::Experimental::HPX >
struct  Event< Kokkos::Experimental::HPX >
struct  Immovable
 Immovable type. More...
struct  MakeOpState
struct  OptionalRef
 A non-owning, nullable reference to a T. More...
class  OptionalStorage
 Data structure that has an interface similar to std::optional but stores the value with stdexec::__manual_lifetime. More...
struct  queryable_for
struct  Receiver
 Receiver for an object parent_op that implements complete. More...
struct  State
struct  SubmittedReceiverTag
struct  SubmittedOperationStateTag
struct  HasExecWaitEvent< Kokkos::SYCL >
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  sync_policy
concept  submitted_policy
concept  has_exec_wait_event
 Determine if the Kokkos backend can enqueue a wait for an event into an execution space instance.
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.
concept  supports_submitted
concept  supports_submitted_order_on
concept  supports_submitted_depend_on
concept  signals_submitted

Typedefs

template<typename Data>
using bulk_traits = BulkTraits<std::remove_cvref_t<Data>>
template<stdexec::sender Sndr, stdexec::__valid_completion_signatures ExtraSigs, typename... Env>
using completion_signatures_add_t = decltype(completion_signatures_add<Sndr, ExtraSigs, Env...>())
template<Kokkos::ExecutionSpace Exec>
using event_storage_t = std::optional<Event<Exec>>
template<Kokkos::ExecutionSpace Exec>
using OptionalConstEventRef = OptionalRef<const Event<Exec>>
 Optionally stores a reference to a const Impl::Event.
template<typename... Args>
using exec_of_t = typename ExecOf<Args...>::type
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.

Functions

template<stdexec::sender Sndr, stdexec::__valid_completion_signatures ExtraSigs, typename... Env>
consteval auto completion_signatures_add ()
 Concatenate Sndr completion signatures with ExtraSigs if Sndr sends on the value channel; otherwise return Sndr completion signatures unchanged.
template<Kokkos::ExecutionSpace... ExecFrom>
requires (std::same_as<ExecFrom, Kokkos::Cuda> && ...)
void impl_wait (const Kokkos::Cuda &exec, const Event< ExecFrom > &... events)
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 impl_wait (const Event< Exec > &... events)
template<Kokkos::ExecutionSpace... Exec>
void wait (const Event< Exec > &... events)
 Wait for events to complete.
template<Kokkos::ExecutionSpace ExecTo, Kokkos::ExecutionSpace... ExecFrom>
void impl_wait (const ExecTo &, const Event< ExecFrom > &... events)
template<Kokkos::ExecutionSpace ExecTo, Kokkos::ExecutionSpace... ExecFrom>
void wait (const ExecTo &exec, const Event< ExecFrom > &... events)
 The operations enqueued from the calling thread into exec cannot start before the event events completes.
template<Kokkos::ExecutionSpace... ExecFrom>
requires (std::same_as<ExecFrom, Kokkos::HIP> && ...)
void impl_wait (const Kokkos::HIP &exec, const Event< ExecFrom > &... events)
template<Kokkos::ExecutionSpace... Exec>
requires (std::same_as<Exec, Kokkos::Experimental::HPX> && ...)
void impl_wait (const Event< Kokkos::Experimental::HPX > &event, const Event< Exec > &... events)
template<Kokkos::ExecutionSpace... ExecFrom>
requires (std::same_as<ExecFrom, Kokkos::Experimental::HPX> && ...)
void impl_wait (const Kokkos::Experimental::HPX &exec, const Event< ExecFrom > &... events)
template<Kokkos::ExecutionSpace... ExecFrom>
requires (std::same_as<ExecFrom, Kokkos::SYCL> && ...)
void impl_wait (const Kokkos::SYCL &exec, const Event< ExecFrom > &... events)

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.

◆ completion_signatures_add_t

template<stdexec::sender Sndr, stdexec::__valid_completion_signatures ExtraSigs, typename... Env>
using Kokkos::Execution::Impl::completion_signatures_add_t = decltype(completion_signatures_add<Sndr, ExtraSigs, Env...>())

Definition at line 29 of file completion_signatures.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 174 of file event.hpp.

◆ exec_of_t

template<typename... Args>
using Kokkos::Execution::Impl::exec_of_t = typename ExecOf<Args...>::type

Definition at line 37 of file get_exec.hpp.

◆ OptionalConstEventRef

template<Kokkos::ExecutionSpace Exec>
using Kokkos::Execution::Impl::OptionalConstEventRef = OptionalRef<const Event<Exec>>

Optionally stores a reference to a const Impl::Event.

Definition at line 178 of file event.hpp.

Function Documentation

◆ completion_signatures_add()

template<stdexec::sender Sndr, stdexec::__valid_completion_signatures ExtraSigs, typename... Env>
auto Kokkos::Execution::Impl::completion_signatures_add ( )
consteval

Concatenate Sndr completion signatures with ExtraSigs if Sndr sends on the value channel; otherwise return Sndr completion signatures unchanged.

References:

Definition at line 18 of file completion_signatures.hpp.

◆ 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/7]

template<Kokkos::ExecutionSpace... Exec>
void Kokkos::Execution::Impl::impl_wait ( const Event< Exec > &... events)

Definition at line 146 of file event.hpp.

References Kokkos::Execution::Impl::Event< Exec >::wait().

◆ impl_wait() [2/7]

template<Kokkos::ExecutionSpace... Exec>
requires (std::same_as<Exec, Kokkos::Experimental::HPX> && ...)
void Kokkos::Execution::Impl::impl_wait ( const Event< Kokkos::Experimental::HPX > & event,
const Event< Exec > &... events )

Mark the events as consumed.

Definition at line 81 of file event.hpp.

References impl_wait().

◆ impl_wait() [3/7]

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

Definition at line 158 of file event.hpp.

References Kokkos::Execution::Impl::Event< Exec >::wait().

◆ impl_wait() [4/7]

template<Kokkos::ExecutionSpace... ExecFrom>
requires (std::same_as<ExecFrom, Kokkos::Cuda> && ...)
void Kokkos::Execution::Impl::impl_wait ( const Kokkos::Cuda & exec,
const Event< ExecFrom > &... events )

Definition at line 54 of file event.hpp.

References impl_wait().

◆ impl_wait() [5/7]

template<Kokkos::ExecutionSpace... ExecFrom>
requires (std::same_as<ExecFrom, Kokkos::Experimental::HPX> && ...)
void Kokkos::Execution::Impl::impl_wait ( const Kokkos::Experimental::HPX & exec,
const Event< ExecFrom > &... events )

Mark the events as consumed.

Definition at line 94 of file event.hpp.

References impl_wait().

◆ impl_wait() [6/7]

template<Kokkos::ExecutionSpace... ExecFrom>
requires (std::same_as<ExecFrom, Kokkos::HIP> && ...)
void Kokkos::Execution::Impl::impl_wait ( const Kokkos::HIP & exec,
const Event< ExecFrom > &... events )

Definition at line 54 of file event.hpp.

References impl_wait().

◆ impl_wait() [7/7]

template<Kokkos::ExecutionSpace... ExecFrom>
requires (std::same_as<ExecFrom, Kokkos::SYCL> && ...)
void Kokkos::Execution::Impl::impl_wait ( const Kokkos::SYCL & exec,
const Event< ExecFrom > &... events )

Definition at line 52 of file event.hpp.

References impl_wait().

◆ record()

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

Record event on exec.

Definition at line 140 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 > &... events)

Wait for events to complete.

Definition at line 152 of file event.hpp.

References impl_wait(), and wait_event().

◆ wait() [2/2]

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

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

Note
Backends should specialize impl_wait.

Definition at line 168 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 87 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 94 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 19 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 50 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 51 of file event.hpp.