Class representing the implementation of command_graph<executable>. More...
#include <detail/graph_impl.hpp>
Public Types | |
using | ReadLock = std::shared_lock< std::shared_mutex > |
using | WriteLock = std::unique_lock< std::shared_mutex > |
Public Member Functions | |
exec_graph_impl (sycl::context Context, const std::shared_ptr< graph_impl > &GraphImpl, const property_list &PropList) | |
Constructor. More... | |
~exec_graph_impl () | |
Destructor. More... | |
void | makePartitions () |
Partition the graph nodes and put the partition in MPartitions. More... | |
sycl::event | enqueue (const std::shared_ptr< sycl::detail::queue_impl > &Queue, sycl::detail::CG::StorageInitHelper CGData) |
Called by handler::ext_oneapi_command_graph() to schedule graph for execution. More... | |
void | createCommandBuffers (sycl::device Device, std::shared_ptr< partition > &Partition) |
Turns the internal graph representation into UR command-buffers for a device. More... | |
sycl::device | getDevice () const |
Query for the device tied to this graph. More... | |
sycl::context | getContext () const |
Query for the context tied to this graph. More... | |
const std::list< std::shared_ptr< node_impl > > & | getSchedule () const |
Query the scheduling of node execution. More... | |
const std::shared_ptr< graph_impl > & | getGraphImpl () const |
Query the graph_impl. More... | |
const std::vector< std::shared_ptr< partition > > & | getPartitions () const |
Query the vector of the partitions composing the exec_graph. More... | |
bool | previousSubmissionCompleted () const |
Checks if the previous submissions of this graph have been completed This function checks the status of events associated to the previous graph submissions. More... | |
std::vector< sycl::detail::AccessorImplHost * > | getRequirements () const |
Returns a list of all the accessor requirements for this graph. More... | |
void | update (std::shared_ptr< graph_impl > GraphImpl) |
void | update (std::shared_ptr< node_impl > Node) |
void | update (const std::vector< std::shared_ptr< node_impl >> Nodes) |
void | updateImpl (std::shared_ptr< node_impl > NodeImpl) |
Public Attributes | |
std::shared_mutex | MMutex |
Protects all the fields that can be changed by class' methods. More... | |
Class representing the implementation of command_graph<executable>.
Definition at line 1296 of file graph_impl.hpp.
using sycl::_V1::ext::oneapi::experimental::detail::exec_graph_impl::ReadLock = std::shared_lock<std::shared_mutex> |
Definition at line 1298 of file graph_impl.hpp.
using sycl::_V1::ext::oneapi::experimental::detail::exec_graph_impl::WriteLock = std::unique_lock<std::shared_mutex> |
Definition at line 1299 of file graph_impl.hpp.
sycl::_V1::ext::oneapi::experimental::detail::exec_graph_impl::exec_graph_impl | ( | sycl::context | Context, |
const std::shared_ptr< graph_impl > & | GraphImpl, | ||
const property_list & | PropList | ||
) |
Constructor.
Nodes from GraphImpl will be copied when constructing this exec_graph_impl so that nodes may be modified (e.g. when merging subgraph nodes).
Context | Context to create graph with. |
GraphImpl | Modifiable graph implementation to create with. |
PropList | List of properties for constructing this object |
Definition at line 757 of file graph_impl.cpp.
References sycl::_V1::feature_not_supported.
sycl::_V1::ext::oneapi::experimental::detail::exec_graph_impl::~exec_graph_impl | ( | ) |
Destructor.
Releases any UR command-buffers the object has created.
Definition at line 781 of file graph_impl.cpp.
References __SYCL_REPORT_EXCEPTION_TO_STREAM, and sycl::_V1::detail::getSyclObjImpl().
void sycl::_V1::ext::oneapi::experimental::detail::exec_graph_impl::createCommandBuffers | ( | sycl::device | Device, |
std::shared_ptr< partition > & | Partition | ||
) |
Turns the internal graph representation into UR command-buffers for a device.
Device | Device to create backend command-buffers for. |
Partion | Partition to which the created command-buffer should be attached. |
Definition at line 699 of file graph_impl.cpp.
References sycl::_V1::detail::getSyclObjImpl(), and sycl::_V1::invalid.
sycl::event sycl::_V1::ext::oneapi::experimental::detail::exec_graph_impl::enqueue | ( | const std::shared_ptr< sycl::detail::queue_impl > & | Queue, |
sycl::detail::CG::StorageInitHelper | CGData | ||
) |
Called by handler::ext_oneapi_command_graph() to schedule graph for execution.
Queue | Command-queue to schedule execution on. |
CGData | Command-group data provided by the sycl::handler |
Definition at line 818 of file graph_impl.cpp.
References sycl::_V1::detail::enqueueImpKernel(), sycl::_V1::event, sycl::_V1::invalid, sycl::_V1::detail::CG::StorageInitHelper::MAccStorage, sycl::_V1::make_error_code(), sycl::_V1::detail::CG::StorageInitHelper::MEvents, MMutex, and sycl::_V1::detail::CG::StorageInitHelper::MRequirements.
|
inline |
Query for the context tied to this graph.
Definition at line 1349 of file graph_impl.hpp.
|
inline |
Query for the device tied to this graph.
Definition at line 1345 of file graph_impl.hpp.
|
inline |
Query the graph_impl.
Definition at line 1359 of file graph_impl.hpp.
|
inline |
Query the vector of the partitions composing the exec_graph.
Definition at line 1363 of file graph_impl.hpp.
|
inline |
Returns a list of all the accessor requirements for this graph.
Definition at line 1382 of file graph_impl.hpp.
|
inline |
Query the scheduling of node execution.
Definition at line 1353 of file graph_impl.hpp.
void sycl::_V1::ext::oneapi::experimental::detail::exec_graph_impl::makePartitions | ( | ) |
Partition the graph nodes and put the partition in MPartitions.
The partitioning splits the graph to allow synchronization between device events and events that do not run on the same device such as host_task.
Definition at line 183 of file graph_impl.cpp.
|
inline |
Checks if the previous submissions of this graph have been completed This function checks the status of events associated to the previous graph submissions.
Definition at line 1372 of file graph_impl.hpp.
void sycl::_V1::ext::oneapi::experimental::detail::exec_graph_impl::update | ( | const std::vector< std::shared_ptr< node_impl >> | Nodes | ) |
Definition at line 1233 of file graph_impl.cpp.
References sycl::_V1::detail::getSyclObjImpl(), sycl::_V1::invalid, and updateImpl().
void sycl::_V1::ext::oneapi::experimental::detail::exec_graph_impl::update | ( | std::shared_ptr< graph_impl > | GraphImpl | ) |
Definition at line 1161 of file graph_impl.cpp.
References sycl::_V1::invalid.
Referenced by update().
void sycl::_V1::ext::oneapi::experimental::detail::exec_graph_impl::update | ( | std::shared_ptr< node_impl > | Node | ) |
Definition at line 1229 of file graph_impl.cpp.
References update().
void sycl::_V1::ext::oneapi::experimental::detail::exec_graph_impl::updateImpl | ( | std::shared_ptr< node_impl > | NodeImpl | ) |
Definition at line 1314 of file graph_impl.cpp.
References sycl::_V1::detail::applyFuncOnFilteredArgs(), sycl::_V1::access::discard_write, sycl::_V1::detail::getSyclObjImpl(), sycl::_V1::invalid, sycl::_V1::access::read, sycl::_V1::detail::ReverseRangeDimensionsForKernel(), sycl::_V1::detail::tie(), and sycl::_V1::access::write.
Referenced by update().
|
mutable |
Protects all the fields that can be changed by class' methods.
Definition at line 1302 of file graph_impl.hpp.
Referenced by enqueue().