Contents

class

SushiAI::Graph::CompiledStep

Manages the lowered and compiled execution plan for a graph.

Declared in
include/SushiAI/graph/compiled_step.hpp

Public member functions

CompiledStep(SushiBLAS::Engine &engine, const Graph &graph, TensorPool &pool, IStepRecorder *trailing=nullptr, const IFusionSelector *selector=nullptr)

Lowers graph, compiles it once, and arms it for execution.

Parameters

engine

Recording engine; must outlive this step.

graph

The graph to lower.

pool

Memory pool behind values; must outlive this step.

trailing

Optional extra recorder for trailing replay work.

selector

Fusion selector, or null for default.

CompiledStep(const CompiledStep &)=delete
CompiledStep & operator=(const CompiledStep &)=delete
CompiledStep(CompiledStep &&)=delete
CompiledStep & operator=(CompiledStep &&)=delete
void run()

Re-arms the plan, executes it, and waits for completion.

bool has_trailing_work() const noexcept

Whether extra non-IR work was folded into this plan.

std::size_t compile_count() const noexcept

How many times this step has been compiled.

One, always, for the life of the object - that is the point. Exposed so a test can hold the guarantee to account.

std::size_t run_count() const noexcept

How many times run() has executed the plan.

bool empty() const noexcept

Whether the graph lowered to no runnable work at all.

std::size_t operation_count() const noexcept

How many SushiBLAS calls the step is made of.

SushiRuntime::span< const FusionSelection > selections() const noexcept

What the selector chose for each fused node; see Lowering.

SushiRuntime::Execution::CompiledGraph & plan() noexcept

The compiled plan, for profiling.

Exposed only so a caller can hand it to IExecutionEngine::reset_profiling / collect_profiling. Do not compile, rearm or execute it yourself.