Skip to main content

ClikaRT::graph::DimDomain

struct

Header: ClikaRT/graph/bench.h

The extents one input dimension admits.

A dimension the model declared with a fixed size, or one a compile pinned to a single value, is Fixed. A dynamic dimension compiled with a recorded shape profile (an ONNX compile given InputSpec ranges or named-dim bindings) is Range: min and max are the smallest and largest extents over every profile, and opt is the extent the graph specializes to. A dynamic dimension with no recorded profile is Free and admits any non-negative extent. Ranges exist only for profiled ONNX compiles; a traced graph's dynamic dimensions are Free.

Types​

enum Kind​

enum class Kind : std::int32_t

How the admitted extents are described.

EnumeratorDescription
Fixedexactly one extent (min==opt==max)
Rangeevery extent in [min, max]; opt is the specialized one
Freeany extent >= 0; min, opt and max are -1

Declared in ClikaRT/graph/bench.h, line 40

Member functions​

admits()​

bool admits(std::int64_t extent) const noexcept

True when extent is admitted: Fixed admits extent == opt only, Range admits min<= extent <=max, Free admits any extent >= 0.

Declared in ClikaRT/graph/bench.h, line 53

Data members​

kind​

Kind kind = Kind::Free

which description applies

Declared in ClikaRT/graph/bench.h, line 45

min​

std::int64_t min = -1

smallest admitted extent (Fixed, Range), else -1

Declared in ClikaRT/graph/bench.h, line 46

opt​

std::int64_t opt = -1

the extent the compiled graph specializes to, else -1

Declared in ClikaRT/graph/bench.h, line 47

max​

std::int64_t max = -1

largest admitted extent (Fixed, Range), else -1

Declared in ClikaRT/graph/bench.h, line 48

name​

std::string name

the dimension's declared name (an ONNX dim_param), or ""

Declared in ClikaRT/graph/bench.h, line 49