@@ -46,35 +46,53 @@ impl From<TensorElementType> for DType {
4646}
4747
4848/// A struct for tensor attrs composed of the names, the dtypes, and the dimensions.
49+ /// ONNX Runtime tensor attributes containing names, data types, and dimensions.
4950#[ derive( Builder , Debug , Clone , Default ) ]
51+ /// ONNX Runtime tensor attributes containing metadata.
5052pub struct OrtTensorAttr {
53+ /// Tensor names.
5154 pub names : Vec < String > ,
55+ /// Tensor data types.
5256 pub dtypes : Vec < TensorElementType > ,
57+ /// Tensor dimensions for each tensor.
5358 pub dimss : Vec < Vec < usize > > ,
5459}
5560
61+ /// ONNX I/O structure containing input/output attributes and session.
5662#[ derive( Debug ) ]
5763pub struct OnnxIo {
64+ /// Input tensor attributes.
5865 pub inputs : OrtTensorAttr ,
66+ /// Output tensor attributes.
5967 pub outputs : OrtTensorAttr ,
68+ /// ONNX Runtime session.
6069 pub session : Session ,
70+ /// ONNX model protocol buffer.
6171 pub proto : onnx:: ModelProto ,
6272}
6373
74+ /// ONNX Runtime inference engine with configuration and session management.
6475#[ derive( Debug , Builder ) ]
6576pub struct Engine {
77+ /// Model file path.
6678 pub file : String ,
79+ /// Model specification string.
6780 pub spec : String ,
81+ /// Execution device.
6882 pub device : Device ,
6983 #[ args( inc) ]
7084 pub iiixs : Vec < Iiix > ,
7185 #[ args( aka = "parameters" ) ]
7286 pub params : Option < usize > ,
7387 #[ args( aka = "memory" ) ]
7488 pub wbmems : Option < usize > ,
89+ /// Input min-opt-max configurations.
7590 pub inputs_minoptmax : Vec < Vec < MinOptMax > > ,
91+ /// ONNX I/O structure.
7692 pub onnx : Option < OnnxIo > ,
93+ /// Timing statistics.
7794 pub ts : Ts ,
95+ /// Number of dry runs for warmup.
7896 pub num_dry_run : usize ,
7997
8098 // global
@@ -158,7 +176,7 @@ impl Default for Engine {
158176 // cann
159177 cann_graph_inference : true ,
160178 cann_dump_graphs : false ,
161- cann_dump_om_model : false ,
179+ cann_dump_om_model : true ,
162180 // nnapi
163181 nnapi_cpu_only : false ,
164182 nnapi_disable_cpu : false ,
0 commit comments