pub struct VersionConverter { /* private fields */ }Expand description
Registry and executor for opset conversion adapters.
Implementations§
Source§impl VersionConverter
impl VersionConverter
Sourcepub fn empty() -> Self
pub fn empty() -> Self
Create a converter without operator-specific adapters.
Schema-proven compatible bumps remain available.
Sourcepub fn register<A: OpAdapter + 'static>(&mut self, adapter: A)
pub fn register<A: OpAdapter + 'static>(&mut self, adapter: A)
Register or replace an adapter for its source tuple.
Sourcepub fn available_conversions(
&self,
domain: &str,
op_type: &str,
) -> Vec<(u32, u32)>
pub fn available_conversions( &self, domain: &str, op_type: &str, ) -> Vec<(u32, u32)>
List registered (source, target) conversions for an operator.
Sourcepub fn convert(
&self,
model: &mut Model,
target_opset: u32,
) -> Result<ConvertReport, ConvertError>
pub fn convert( &self, model: &mut Model, target_opset: u32, ) -> Result<ConvertReport, ConvertError>
Convert the default ONNX domain to target_opset.
A node without an adapter is accepted only when the schema registry has
positive evidence that one schema covers the full conversion interval.
Otherwise it is reported as incompatible and no changes are committed
to model.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for VersionConverter
impl !UnwindSafe for VersionConverter
impl Freeze for VersionConverter
impl Send for VersionConverter
impl Sync for VersionConverter
impl Unpin for VersionConverter
impl UnsafeUnpin for VersionConverter
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