Skip to main content

ClikaRT::spec::InputSpecs

struct

Header: ClikaRT/graph/input_specs.h

The full input-shape specification: named-dim bindings + one or more per-input profiles. Every profile is validated against the model; profile 0's opt shapes are what the compiled graph is specialized to (additional profiles are recorded, not engine-selected; execution is eager, binding real shapes at run time).

Member functions

empty()

bool empty() const noexcept

True when no named-dim binding and no profile entry is present.

Declared in ClikaRT/graph/input_specs.h, line 216

bind()

InputSpecs& bind(Dim dim)

Bind a named dimension. Chains: specs.bind(Dim("batch_size", 1)).bind(Dim("sequence_length", 128)).

Declared in ClikaRT/graph/input_specs.h, line 226

add()

InputSpecs& add(InputSpec spec)

Append spec to profile 0 (created if absent). Chains: specs.add({"input_ids", {1, 128}}).add({"attention_mask", {1, 128}}).

Declared in ClikaRT/graph/input_specs.h, line 233

merge()

InputSpecs& merge(const InputSpecs& other)

Merge another spec set: named-dim bindings append; profile i of other appends to profile i here (created as needed). The merge tool for combining a hand-written set with a derived one (generate_kv_input_specs).

Declared in ClikaRT/graph/input_specs.h, line 243

Data members

dims

std::vector<Dim> dims

Named-dim bindings: each resolves EVERY input dim declared with that name (see Dim). The most compact road for models whose exporter named the dynamic dims. A binding naming a dim the model does not declare is an error (it would silently do nothing).

Declared in ClikaRT/graph/input_specs.h, line 212

profiles

std::vector<InputProfile> profiles

per-input profiles; profile 0 drives specialization.

Declared in ClikaRT/graph/input_specs.h, line 213