Skip to main content

ClikaRT::graph::Value

class

Header: ClikaRT/graph/node.h

A tensor on a graph edge: an operator's output on one port, a graph input, or a constant (a weight bound into the graph). One value per (producer, port): the same tensor consumed by two operators is one value.

Member functions​

name()​

std::string name() const

The name the graph declared for this tensor: a graph output's declared name. Every other value is unnamed (empty): identify it by its producer and port, and read a graph input's name from its Input node.

Declared in ClikaRT/graph/node.h, line 93

spec()​

spec::TensorSpec spec() const

The (name, dtype, dims) spec. A dim the graph left dynamic reads as spec::TensorSpec::kDynamicDim and keeps the model's name for it, when there is one, in dim_names.

Declared in ClikaRT/graph/node.h, line 97

is_constant()​

bool is_constant() const

A constant: a weight or another tensor bound into the graph, with bytes fixed for the graph's lifetime. constant() reads them.

Declared in ClikaRT/graph/node.h, line 100

is_state()​

bool is_state() const

A live state buffer the graph seeds and rewrites in place between runs (a key/value cache plane): bound like a constant, but its bytes change.

Declared in ClikaRT/graph/node.h, line 103

is_graph_input()​

bool is_graph_input() const

A runtime input: the output of an Input node, bound by the caller at run.

Declared in ClikaRT/graph/node.h, line 106

is_graph_output()​

bool is_graph_output() const

A graph output: one of the tensors run returns.

Declared in ClikaRT/graph/node.h, line 108

producer()​

std::optional<Node> producer() const

The node that produces this value. Empty for a constant or a state buffer: no operator produces those.

Declared in ClikaRT/graph/node.h, line 111

producer_port()​

int producer_port() const

The output port of producer() this value leaves on (0 when there is no producer).

Declared in ClikaRT/graph/node.h, line 114

constant()​

Tensor constant() const

The constant's tensor: a shared handle to the bound bytes, no copy. Fails with Status::InvalidArgument when the value is not a constant.

Declared in ClikaRT/graph/node.h, line 118