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

Classes

struct  ApplySenderFor
struct  ApplySenderFor< stdexec::sync_wait_t >
struct  ContinuesOnOpState
 Operation state for stdexec::continues_on. More...
struct  ContinuesOnOpStateBase
struct  ContinuesOnReceiver
 Receiver for continues_on. More...
struct  ContinuesOnSender
 Sender for stdexec::continues_on. More...
struct  Domain
struct  get_graph_t
struct  get_node_t
struct  GraphAddAggregateNodeEvent
 Event to be sent to Kokkos::utils::callbacks::dispatch when a Kokkos graph aggregate node is added. More...
struct  GraphAddNodeEvent
 Event to be sent to Kokkos::utils::callbacks::dispatch when a Kokkos graph node is added. More...
struct  GraphCompletingSender
struct  GraphComposition
 Inspired by https://github.com/NVIDIA/stdexec/blob/8c5eedd0fcf9a8ebcdb75d988f72f88efcf64a37/include/stdexec/__detail/__completion_behavior.hpp#L33. More...
struct  GraphCreateEvent
 Event to be sent to Kokkos::utils::callbacks::dispatch when a Kokkos graph is created. More...
struct  GraphInstantiateEvent
 Event to be sent to Kokkos::utils::callbacks::dispatch when a Kokkos graph is instantiated. More...
struct  GraphOperationStateFor
struct  GraphOperationStateFor< OpState, Exec >
 Specialization for Kokkos::Execution::GraphImpl::ContinuesOnOpState. More...
struct  GraphSubmitEvent
 Event to be sent to Kokkos::utils::callbacks::dispatch when a Kokkos graph is submitted. More...
struct  OpState
 Operation state that adds all closures as a sequence of nodes. More...
struct  OpStateBase
 Operation state whose sole purpose is to propagate the completion signal. More...
struct  ParallelForClosure
struct  ParallelForSender
struct  RemainsOnGraphFor
struct  RemainsOnGraphFor< OpState, Exec >
 Specialization for Kokkos::Execution::GraphImpl::Scheduler::OpState. More...
struct  ScheduleFromOpState
 Operation state for stdexec::schedule_from. More...
struct  ScheduleFromOpStateBase
struct  ScheduleFromSender
 Sender for stdexec::schedule_from. More...
struct  Scheduler
 Scheduler for a Kokkos::Experimental::Graph. More...
struct  State
struct  State< GraphComposition::Attach, Exec >
 If the graph composition policy is GraphComposition::Attach, nothing needs to be stored. More...
struct  State< GraphComposition::Create, Exec >
 If the graph composition policy is GraphComposition::Create, the device handle is already stored by the graph itself. More...
struct  ThenClosure
struct  ThenSender
 Sender for stdexec::then. More...
struct  TransformSenderFor
struct  TransformSenderFor< Kokkos::Execution::parallel_for_t >
struct  TransformSenderFor< stdexec::bulk_t >
struct  TransformSenderFor< stdexec::continues_on_t >
struct  TransformSenderFor< stdexec::schedule_from_t >
struct  TransformSenderFor< stdexec::then_t >
struct  TransformSenderFor< stdexec::when_all_t >
struct  WhenAllOpState
 Operation state for stdexec::when_all. More...
struct  WhenAllSender
 Sender for stdexec::when_all. More...
struct  WITH_SENDER_AT_INDEX

Concepts

concept  Closure
concept  graph_completing_sender
 Concept for a sender whose completion scheduler is Kokkos::Execution::GraphImpl::Scheduler.
concept  graph_operation_state_for
concept  NodeRef
 Constrain a type that is a specialization of Kokkos::Experimental::GraphNodeRef.
concept  remains_on_graph_for

Typedefs

template<typename Sndr, typename Rcvr, typename... Clsrs>
using make_op_state_t = Impl::MakeOpState<Domain, OpState>::Huddle<Sndr, Rcvr, Clsrs...>
template<typename Sndr, typename Rcvr, typename... Clsrs>
using op_state_t = typename make_op_state_t<Sndr, Rcvr, Clsrs...>::type
template<size_t Index, typename Sndr>
using WITH_PRETTY_SENDER_AT_INDEX = WITH_SENDER_AT_INDEX<Index, stdexec::__demangle_t<Sndr>>

Functions

template<NodeRef NodeType>
auto * get_graph_impl_ptr (const NodeType &node) noexcept
 Retrieve the raw graph pointer from a node.
template<NodeRef NodeType>
auto * get_node_ptr (const NodeType &node) noexcept
 Retrieve the raw node pointer.
template<Kokkos::ExecutionSpace Exec>
void graph_create_event (const Kokkos::Experimental::Graph< Exec > &graph)
 Record a GraphCreateEvent event.
template<Kokkos::ExecutionSpace Exec, typename... Args>
auto create_graph (const Kokkos::Impl::DeviceHandle< Exec > &device_handle, Args &&... args)
 Create a graph and record the associated event with graph_create_event.
template<NodeRef Predecessor, NodeRef NodeType, Kokkos::ExecutionSpace Exec>
void graph_add_node_event (const Predecessor &predecessor, const NodeType &node, const Kokkos::Impl::DeviceHandle< Exec > &device_handle)
 Record an event for a node added after predecessor.
template<NodeRef NodeType, NodeRef... Predecessors>
void graph_add_aggregate_node_event (const NodeType &aggregate, const Predecessors &... predecessors)
 Record an event for an aggregate node added after predecessors.
template<Kokkos::ExecutionSpace Exec>
void graph_instantiate_event (const Kokkos::Experimental::Graph< Exec > &graph)
 Record a GraphInstantiateEvent event.
template<Kokkos::ExecutionSpace Exec>
void graph_submit_event (const Kokkos::Experimental::Graph< Exec > &graph, const Exec &exec)
 Record a GraphSubmitEvent event.
template<Kokkos::ExecutionSpace Exec>
void submit_graph (const Kokkos::Experimental::Graph< Exec > &graph, const Exec &exec)
 Submit a graph and record the associated event with graph_submit_event.
template<typename Predecessor, Closure FirstClosure>
requires NodeRef<std::remove_cvref_t<Predecessor>>
static auto add_nodes (Predecessor &&predecessor, FirstClosure &&clsr)
 Add all nodes as a sequence. Hence, only the first node may be added after the root node.
template<typename Predecessor, Closure FirstClosure, Closure... RestOfClosures>
requires NodeRef<std::remove_cvref_t<Predecessor>> && (sizeof...(RestOfClosures) > 0)
static auto add_nodes (Predecessor &&predecessor, FirstClosure &&clsr, RestOfClosures &&... clsrs)
template<typename Tag, typename Sndr, typename... Env>
auto no_graph_scheduler_in_env () noexcept
 Show a better compile diagnostic when there is no Kokkos::Execution::GraphImpl::Scheduler found.

Variables

constexpr get_graph_t get_graph {}
constexpr get_node_t get_node {}

Typedef Documentation

◆ make_op_state_t

template<typename Sndr, typename Rcvr, typename... Clsrs>
using Kokkos::Execution::GraphImpl::make_op_state_t = Impl::MakeOpState<Domain, OpState>::Huddle<Sndr, Rcvr, Clsrs...>

Definition at line 292 of file operation_state.hpp.

◆ op_state_t

template<typename Sndr, typename Rcvr, typename... Clsrs>
using Kokkos::Execution::GraphImpl::op_state_t = typename make_op_state_t<Sndr, Rcvr, Clsrs...>::type

Definition at line 295 of file operation_state.hpp.

◆ WITH_PRETTY_SENDER_AT_INDEX

template<size_t Index, typename Sndr>
using Kokkos::Execution::GraphImpl::WITH_PRETTY_SENDER_AT_INDEX = WITH_SENDER_AT_INDEX<Index, stdexec::__demangle_t<Sndr>>

Definition at line 266 of file when_all.hpp.

Function Documentation

◆ add_nodes() [1/2]

template<typename Predecessor, Closure FirstClosure>
requires NodeRef<std::remove_cvref_t<Predecessor>>
auto Kokkos::Execution::GraphImpl::add_nodes ( Predecessor && predecessor,
FirstClosure && clsr )
static

Add all nodes as a sequence. Hence, only the first node may be added after the root node.

Definition at line 147 of file operation_state.hpp.

References add_nodes().

◆ add_nodes() [2/2]

template<typename Predecessor, Closure FirstClosure, Closure... RestOfClosures>
requires NodeRef<std::remove_cvref_t<Predecessor>> && (sizeof...(RestOfClosures) > 0)
auto Kokkos::Execution::GraphImpl::add_nodes ( Predecessor && predecessor,
FirstClosure && clsr,
RestOfClosures &&... clsrs )
static

Definition at line 153 of file operation_state.hpp.

References add_nodes().

◆ create_graph()

template<Kokkos::ExecutionSpace Exec, typename... Args>
auto Kokkos::Execution::GraphImpl::create_graph ( const Kokkos::Impl::DeviceHandle< Exec > & device_handle,
Args &&... args )

Create a graph and record the associated event with graph_create_event.

Definition at line 120 of file events.hpp.

References create_graph(), and graph_create_event().

◆ get_graph_impl_ptr()

template<NodeRef NodeType>
auto * Kokkos::Execution::GraphImpl::get_graph_impl_ptr ( const NodeType & node)
noexcept

Retrieve the raw graph pointer from a node.

Definition at line 94 of file events.hpp.

References get_graph_impl_ptr().

◆ get_node_ptr()

template<NodeRef NodeType>
auto * Kokkos::Execution::GraphImpl::get_node_ptr ( const NodeType & node)
noexcept

Retrieve the raw node pointer.

Definition at line 100 of file events.hpp.

References get_node_ptr().

◆ graph_add_aggregate_node_event()

template<NodeRef NodeType, NodeRef... Predecessors>
void Kokkos::Execution::GraphImpl::graph_add_aggregate_node_event ( const NodeType & aggregate,
const Predecessors &... predecessors )

Record an event for an aggregate node added after predecessors.

Definition at line 148 of file events.hpp.

References Kokkos::utils::callbacks::dispatch(), get_graph_impl_ptr(), get_node_ptr(), and graph_add_aggregate_node_event().

◆ graph_add_node_event()

template<NodeRef Predecessor, NodeRef NodeType, Kokkos::ExecutionSpace Exec>
void Kokkos::Execution::GraphImpl::graph_add_node_event ( const Predecessor & predecessor,
const NodeType & node,
const Kokkos::Impl::DeviceHandle< Exec > & device_handle )

Record an event for a node added after predecessor.

Todo
Once https://github.com/kokkos/kokkos/pull/9137 is merged, get rid of the device_handle argument.

Definition at line 132 of file events.hpp.

References Kokkos::utils::callbacks::dispatch(), get_graph_impl_ptr(), get_node_ptr(), and graph_add_node_event().

◆ graph_create_event()

template<Kokkos::ExecutionSpace Exec>
void Kokkos::Execution::GraphImpl::graph_create_event ( const Kokkos::Experimental::Graph< Exec > & graph)

◆ graph_instantiate_event()

template<Kokkos::ExecutionSpace Exec>
void Kokkos::Execution::GraphImpl::graph_instantiate_event ( const Kokkos::Experimental::Graph< Exec > & graph)

◆ graph_submit_event()

template<Kokkos::ExecutionSpace Exec>
void Kokkos::Execution::GraphImpl::graph_submit_event ( const Kokkos::Experimental::Graph< Exec > & graph,
const Exec & exec )

◆ no_graph_scheduler_in_env()

template<typename Tag, typename Sndr, typename... Env>
auto Kokkos::Execution::GraphImpl::no_graph_scheduler_in_env ( )
noexcept

◆ submit_graph()

template<Kokkos::ExecutionSpace Exec>
void Kokkos::Execution::GraphImpl::submit_graph ( const Kokkos::Experimental::Graph< Exec > & graph,
const Exec & exec )

Submit a graph and record the associated event with graph_submit_event.

Definition at line 179 of file events.hpp.

References graph_submit_event(), and submit_graph().

Variable Documentation

◆ get_graph

get_graph_t Kokkos::Execution::GraphImpl::get_graph {}
inlineconstexpr

Definition at line 17 of file get_graph.hpp.

◆ get_node

get_node_t Kokkos::Execution::GraphImpl::get_node {}
inlineconstexpr

Definition at line 15 of file get_node.hpp.