Contents

class

SushiAI::Graph::Lowering

Translates IR graph operations into recorded SushiBLAS work.

Declared in
include/SushiAI/graph/lowering.hpp

Records device execution tasks in topological node order.

Public member functions

Lowering(SushiBLAS::Engine &engine, TensorPool &pool, const IFusionSelector *selector=nullptr) noexcept

Constructs a lowering coordinator bound to engine and pool.

Parameters

engine

Target SushiBLAS engine for recorded work.

pool

Memory pool supplying buffer allocations.

selector

Optional fused kernel selection strategy.

void record(const Graph &graph)

Records graph operations into the engine task graph.

Parameters

graph

IR graph to lower.

Exceptions

Error

If an operand shape is invalid or leaf is unbound.

std::size_t emitted_operations() const noexcept

Returns the count of SushiBLAS operations recorded.

Returns

Number of operations emitted during the last lowering.

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

Returns fusion selector decisions recorded during lowering.

Returns

Span of chosen fusion configurations in execution order.

Static public member functions

static std::vector< ValueId > values_needing_own_allocation(const Graph &graph)

Identifies values that cannot be safely packed into arenas.

Parameters

graph

Graph to inspect for unpinnable values.

Returns

Vector of value ids requiring standalone allocations.