ClikaRT::graph::OnnxExportOptions
struct
Header: ClikaRT/graph/model_graph.h
How ModelGraph::export_onnx and io::OnnxModel::from_graph write a graph as an ONNX model.
Data members
opset_version
std::int64_t opset_version = 0
The ai.onnx opset the model imports; 0 or less takes the library's default. An operator whose ONNX form needs a newer opset is written as a composition of older operators, or refused, naming the opset.
Declared in ClikaRT/graph/model_graph.h, line 104
contrib_ops
bool contrib_ops = true
Whether the model may use the com.microsoft operators (for example GroupQueryAttention or MatMulNBits). The domain is imported only when an operator uses it.
Declared in ClikaRT/graph/model_graph.h, line 108
optimize
bool optimize = true
Simplify the written model before it is returned: pairs of transposes that undo each other compose, and nodes no output reads are dropped.
Declared in ClikaRT/graph/model_graph.h, line 111
save_as_external_data
std::optional<bool> save_as_external_data
Where the weights go when the model is saved: unset writes them to a <stem>_data file beside the model once they pass 2 GiB, true always does, and false never does.
Declared in ClikaRT/graph/model_graph.h, line 115
producer_name
std::string producer_name
The producer name the model records; empty takes the library's.
Declared in ClikaRT/graph/model_graph.h, line 117
handlers
std::vector<OnnxExportHandler> handlers
Handlers that write chosen operators your way, in this export only (OnnxExportHandler, onnx_export.h). The list is checked before any node is written: an operator named twice, an empty handler, or one for OpCode::Unknown or OpCode::Custom refuses with InvalidArgument.
Declared in ClikaRT/graph/model_graph.h, line 122