class
SushiBLAS::TaskRecorder
Records tasks on one TaskGraph under one execution mode.
- Declared in
include/SushiBLAS/engine/task_recorder.hpp
See also
include/SushiBLAS/engine/README.md
Public member functions
TaskRecorder(SushiRuntime::Graph::TaskGraph &graph, ScratchPool &scratch_pool, ExecutionMode mode=ExecutionMode::AUTO) noexceptBinds the recorder to the graph it records on and the pool its tasks lease from.
Parameters
graphReceives every task; it must outlive the recorder.
scratch_poolLends operation scratch; it must outlive the recorder.
TaskRecorder(const TaskRecorder &)=deleteTaskRecorder & operator=(const TaskRecorder &)=deleteTaskRecorder(TaskRecorder &&)=deleteTaskRecorder & operator=(TaskRecorder &&)=delete~TaskRecorder()=defaultExecutionMode get_mode() const noexceptReturns the mode every later record call is recorded under.
void set_mode(ExecutionMode mode) noexceptSets the mode every later record call is recorded under.
ScratchPool & get_scratch_pool() const noexceptReturns the pool recorded tasks lease their device scratch from.
void require_sycl_path(const char *family, const char *name) constThrows as record() would, for a caller that must refuse before a side effect.
Exceptions
std::invalid_argumentunder FORCE_REFERENCE, naming family and name.
template <typename Body>
TaskHandle record(const SushiRuntime::Graph::TaskMetadata &meta, const OperandSet &operands, const char *family, Body &&body)Records a task that has a SYCL kernel only.
Parameters
familyWhat kind of operation this is, for the diagnostic.
bodyCallable
(sycl::queue&, const std::vector<sycl::event>&) -> sycl::event, copyable and callable more than once; it orders its work behind the events it is given.
Exceptions
std::invalid_argumentunder FORCE_REFERENCE; no task is recorded.
template <typename Body>
TaskHandle record_pair(const SushiRuntime::Graph::TaskMetadata &meta, const OperandSet &operands, const char *family, Body &&body)Records a task whose body runs a reference and SYCL kernel pair.
Parameters
bodyCallable
(const Internal::KernelPairDispatcher&, sycl::queue&, const std::vector<sycl::event>&) -> sycl::event, copyable, callable more than once, and ordering its work behind the events it is given.
Exceptions
std::invalid_argumentunder FORCE_REFERENCE when a declared tensor is device-only USM; no task is recorded.

