pub struct BackendFactory;Implementations§
Source§impl BackendFactory
impl BackendFactory
Sourcepub fn create_best_backend(
manifest: &Manifest,
device_info: &DeviceInfo,
) -> Result<Box<dyn Engine>, String>
pub fn create_best_backend( manifest: &Manifest, device_info: &DeviceInfo, ) -> Result<Box<dyn Engine>, String>
Create the best available backend based on manifest requirements and available hardware
pub fn create_best_backend_with_tuning( manifest: &Manifest, device_info: &DeviceInfo, tuning: &OnnxRuntimeTuning, ) -> Result<Box<dyn Engine>, String>
Sourcepub fn create_backend_for_device(
manifest: &Manifest,
provider: &str,
device_id: usize,
device_info: &DeviceInfo,
) -> Result<Box<dyn Engine>, String>
pub fn create_backend_for_device( manifest: &Manifest, provider: &str, device_id: usize, device_info: &DeviceInfo, ) -> Result<Box<dyn Engine>, String>
Create a backend for a specific device
pub fn create_backend_for_device_with_tuning( manifest: &Manifest, provider: &str, device_id: usize, device_info: &DeviceInfo, tuning: &OnnxRuntimeTuning, ) -> Result<Box<dyn Engine>, String>
Sourcepub fn validate_requirements(
requirements: &HardwareRequirements,
device_info: &DeviceInfo,
) -> Result<(), String>
pub fn validate_requirements( requirements: &HardwareRequirements, device_info: &DeviceInfo, ) -> Result<(), String>
Validate that hardware meets minimum requirements
Auto Trait Implementations§
impl Freeze for BackendFactory
impl RefUnwindSafe for BackendFactory
impl Send for BackendFactory
impl Sync for BackendFactory
impl Unpin for BackendFactory
impl UnsafeUnpin for BackendFactory
impl UnwindSafe for BackendFactory
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more