pub struct CompileOptions {
pub target: CompileTarget,
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.
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.
Trait Implementations§
Source§impl Clone for CompileOptions
impl Clone for CompileOptions
Auto Trait Implementations§
impl !RefUnwindSafe for CompileOptions
impl !UnwindSafe for CompileOptions
impl Freeze for CompileOptions
impl Send for CompileOptions
impl Sync for CompileOptions
impl Unpin for CompileOptions
impl UnsafeUnpin for CompileOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more