Skip to main content

ClikaRT::graph::ModelGraph

class

Header: ClikaRT/graph/model_graph.h

An executable model graph. Move-only.

Member functions

ModelGraph(ModelGraph)

ModelGraph(ModelGraph&&) noexcept

Move-only: transfers the graph.

Declared in ClikaRT/graph/model_graph.h, line 66

operator=(ModelGraph)

ModelGraph& operator=(ModelGraph&&) noexcept

Move-assign: transfers the graph.

Declared in ClikaRT/graph/model_graph.h, line 68

ModelGraph(ModelGraph)

ModelGraph(const ModelGraph&) =delete

Declared in ClikaRT/graph/model_graph.h, line 69

operator=(ModelGraph)

ModelGraph& operator=(const ModelGraph&) =delete

Declared in ClikaRT/graph/model_graph.h, line 70

~ModelGraph()

~ModelGraph()

Releases the graph.

Declared in ClikaRT/graph/model_graph.h, line 72

input_names()

std::vector<std::string> input_names() const

Runtime input names, in the model's declaration order, the order the positional run binds. Weights are not inputs; they ride the graph.

Declared in ClikaRT/graph/model_graph.h, line 77

output_names()

std::vector<std::string> output_names() const

Output names, declaration order, the order every run returns.

Declared in ClikaRT/graph/model_graph.h, line 79

inputs()

std::vector<spec::TensorSpec> inputs() const

Input / output slots as (name, dtype, dims) specs, same order as input_names() / output_names(). A dimension the graph left dynamic reads as spec::TensorSpec::kDynamicDim (-1).

Declared in ClikaRT/graph/model_graph.h, line 84

outputs()

std::vector<spec::TensorSpec> outputs() const

The produced edges as specs, the output twin of inputs().

Declared in ClikaRT/graph/model_graph.h, line 86

run(vector<Tensor>)

std::vector<Tensor> run(std::vector<Tensor> inputs) const

Run with positional inputs (one per input_names() entry, that order). Returns the outputs in output_names() order.

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

run(NamedTensors)

std::vector<Tensor> run(const NamedTensors& inputs) const

Run with positional inputs (one per input_names() entry, that order). Returns the outputs in output_names() order.

Declared in ClikaRT/graph/model_graph.h, line 104

run(vector<Tensor>, vector<Tensor>)

std::vector<Tensor> run(std::vector<Tensor> inputs, std::vector<Tensor> bound_outputs) const

Run with positional inputs (one per input_names() entry, that order). Returns the outputs in output_names() order.

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

run(NamedTensors, NamedTensors)

std::vector<Tensor> run(const NamedTensors& inputs, const NamedTensors& bound_outputs) const

Run with positional inputs (one per input_names() entry, that order). Returns the outputs in output_names() order.

Declared in ClikaRT/graph/model_graph.h, line 125

kv_cache_info()

std::vector<KVCacheLayerInfo> kv_cache_info() const

Per-attention-layer KV-cache descriptors, layer order. Empty = the graph carries no KV cache.

Declared in ClikaRT/graph/model_graph.h, line 133