Skip to main content

ClikaRT::graph::DefaultsOptions

struct

Header: ClikaRT/graph/optimize.h

Choices the optimizer's transforms read. Each default keeps the graph's input and output contract and serves every shape the graph admits.

Data members​

specialize​

bool specialize = false

For a graph compiled from ONNX: collapse the shape arithmetic that the compile's pinned input shapes (CompileOptions::specs, sample_inputs) fix, such as shape cones, masks and reshape templates, into constants. The graph then serves exactly the pinned shapes. Without pinned shapes, the arithmetic the model's own static shapes fix collapses either way. A traced graph ignores this field and follows shape_fixation.

Declared in ClikaRT/graph/optimize.h, line 32

shape_fixation​

bool shape_fixation = false

For a traced graph: collapse the shape arithmetic the traced signature's static dimensions fix. Off, a traced graph keeps every recorded shape computation, since collapsing them specializes it to the traced shapes. A graph compiled from ONNX ignores this field and follows specialize.

Declared in ClikaRT/graph/optimize.h, line 38

channels_last_inputs​

bool channels_last_inputs = false

Omit the standard channels-first to channels-last conversion where a model input enters through one; that input is then supplied channels-last ([N, spatial..., C]). Changes the input contract for exactly those inputs: read inputs() for the layout to supply.

Declared in ClikaRT/graph/optimize.h, line 43

channels_last_outputs​

bool channels_last_outputs = false

The output-side peer: omit the channels-last to channels-first conversion where an output leaves through one, so that output is produced channels-last under its declared name. Read outputs() for the layout delivered.

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