pub struct CompileOptions {
pub target: CompileTarget,
pub runtime_path: Option<PathBuf>,
pub intra_threads: usize,
pub inter_threads: usize,
pub parallel_execution: bool,
pub dimension_overrides: BTreeMap<String, usize>,
}Expand description
Compilation configuration with a mandatory target and no automatic fallback.
Construct with Self::new, then adjust shared settings as needed.
Fields§
§target: CompileTargetRequired target and its provider-specific compilation settings.
runtime_path: Option<PathBuf>Existing ORT shared library; see OnnxOptions::runtime_path.
intra_threads: usizeThreads within an operator during compilation/validation, default 1. Set to 0 to let ONNX Runtime choose.
inter_threads: usizeThreads across operators, used when parallel execution is enabled; default 1.
parallel_execution: boolExecute independent operators in parallel, default false. CUDA graph capture is disabled in this mode.
dimension_overrides: BTreeMap<String, usize>Resolve symbolic ONNX dimensions to fixed sizes before compilation.
Implementations§
Source§impl CompileOptions
impl CompileOptions
Sourcepub fn new(target: CompileTarget) -> Self
pub fn new(target: CompileTarget) -> Self
Select a target explicitly and use defaults for the shared settings. GPU targets must carry their configuration, including when using defaults.