Contents

struct

SushiAI::Graph::Value

One single-assignment tensor-shaped value in the graph.

Declared in
include/SushiAI/graph/ir.hpp

Public attributes

Shape shape {}

The value's extents.

DType dtype = DType::FLOAT32

The value's element type.

TensorLayout layout = TensorLayout::NHWC

The axis order this value's extents are in.

Graph-wide rather than free-floating: see TensorLayout and Graph::finalise(), which proves every node preserves it.

Lifetime lifetime = Lifetime::ACTIVATION

Which arena owns this value's storage.

NodeId producer = NO_NODE

The node that writes this value, or NO_NODE for a leaf.

bool requires_grad = false

Whether a gradient flows back through this value.

Set on parameters by the caller and propagated forward by Graph::finalise(); the differentiation pass uses it to skip whole subgraphs that cannot contribute, which is what makes a frozen layer cost nothing rather than costing a wasted kernel.

std::string_view debug_name {}

A short label carried into the runtime's profiling report.