---
title: "ClikaRT::spec::InputSpec"
sidebar_label: "InputSpec"
description: "The spec for ONE input: identified by name (preferred) or, when name is empty, by position in the model's input order, carrying either a full ShapeProfile or a set of per-dim overrides (never both)."
---

<!-- Generated by tools/doxygen2mdx from Doxygen XML. Do not edit. -->

<span class="api-kind api-kind--struct">struct</span>

**Header:** `ClikaRT/graph/input_specs.h`

The spec for ONE input: identified by [`name`](./InputSpec.md#name) (preferred) or, when [`name`](./InputSpec.md#name) is empty, by [`position`](./InputSpec.md#position) in the model's input order, carrying either a full [`ShapeProfile`](./ShapeProfile.md) or a set of per-dim overrides (never both).

[`InputSpec`](./InputSpec.md) CONSTRAINS: it is a compile/trace directive that pins an input's dynamic dims (only inputs can be pinned; output shapes are derived consequences). [`TensorSpec`](./TensorSpec.md) DESCRIBES: it reports a slot's observed name/dtype/dims. Two types, two jobs.

## Member functions

### InputSpec() {#InputSpec}

<div class="api-signature">

**`InputSpec`**() `=default`

</div>

<div class="api-declared">

Declared in `ClikaRT/graph/input_specs.h`, line 172

</div>

### InputSpec(string\_view, ShapeProfile) {#InputSpec-2}

<div class="api-signature">

**`InputSpec`**(`std::string_view` `input`, [`ShapeProfile`](./ShapeProfile.md) `shape_profile`)

</div>

Spec input `input` with a full min/opt/max `shape_profile`.

<div class="api-declared">

Declared in `ClikaRT/graph/input_specs.h`, line 175

</div>

### InputSpec(string\_view, vector\<int64\_t\>) {#InputSpec-3}

<div class="api-signature">

**`InputSpec`**(`std::string_view` `input`, `std::vector<std::int64_t>` `shape`)

</div>

Spec input `input` with one fixed `shape` (min == opt == max).

<div class="api-declared">

Declared in `ClikaRT/graph/input_specs.h`, line 178

</div>

### InputSpec(string\_view, vector\<DimOverride\>) {#InputSpec-4}

<div class="api-signature">

**`InputSpec`**(`std::string_view` `input`, `std::vector<`[`DimOverride`](./DimOverride.md)`>` `overrides`)

</div>

Spec input `input` with per-dim `overrides` (static dims come from the model).

<div class="api-declared">

Declared in `ClikaRT/graph/input_specs.h`, line 181

</div>

### InputSpec(int32\_t, ShapeProfile) {#InputSpec-5}

<div class="api-signature">

**`InputSpec`**(`std::int32_t` `input_position`, [`ShapeProfile`](./ShapeProfile.md) `shape_profile`)

</div>

Spec the input at `input_position` with a full `shape_profile`.

<div class="api-declared">

Declared in `ClikaRT/graph/input_specs.h`, line 185

</div>

### InputSpec(int32\_t, vector\<int64\_t\>) {#InputSpec-6}

<div class="api-signature">

**`InputSpec`**(`std::int32_t` `input_position`, `std::vector<std::int64_t>` `shape`)

</div>

Spec the input at `input_position` with one fixed `shape`.

<div class="api-declared">

Declared in `ClikaRT/graph/input_specs.h`, line 188

</div>

### InputSpec(int32\_t, vector\<DimOverride\>) {#InputSpec-7}

<div class="api-signature">

**`InputSpec`**(`std::int32_t` `input_position`, `std::vector<`[`DimOverride`](./DimOverride.md)`>` `overrides`)

</div>

Spec the input at `input_position` with per-dim `overrides`.

<div class="api-declared">

Declared in `ClikaRT/graph/input_specs.h`, line 191

</div>

## Data members

### name {#name}

<div class="api-signature">

`std::string` **`name`**

</div>

empty → positional

<div class="api-declared">

Declared in `ClikaRT/graph/input_specs.h`, line 167

</div>

### position {#position}

<div class="api-signature">

`std::int32_t` **`position`** `= -1`

</div>

used when [`name`](./InputSpec.md#name) is empty

<div class="api-declared">

Declared in `ClikaRT/graph/input_specs.h`, line 168

</div>

### profile {#profile}

<div class="api-signature">

[`ShapeProfile`](./ShapeProfile.md) **`profile`**

</div>

full-shape form (empty → use [`dim_overrides`](./InputSpec.md#dim_overrides))

<div class="api-declared">

Declared in `ClikaRT/graph/input_specs.h`, line 169

</div>

### dim\_overrides {#dim_overrides}

<div class="api-signature">

`std::vector<`[`DimOverride`](./DimOverride.md)`>` **`dim_overrides`**

</div>

per-dim form

<div class="api-declared">

Declared in `ClikaRT/graph/input_specs.h`, line 170

</div>
