pub struct AutoTensorExecutor { /* private fields */ }Expand description
Tensor executor that picks the best compatible provider and falls back to CPU.
Implementations§
Source§impl AutoTensorExecutor
impl AutoTensorExecutor
Sourcepub fn new(profile: AutoComputeProfile) -> Self
pub fn new(profile: AutoComputeProfile) -> Self
Builds an automatic executor from a profile.
Sourcepub fn uses_cpu_fallback(&self) -> bool
pub fn uses_cpu_fallback(&self) -> bool
Returns true when the selector is using the CPU fallback.
Sourcepub fn route_decision(&self) -> AutoRouteDecision
pub fn route_decision(&self) -> AutoRouteDecision
Returns the router decision that produced this executor.
Sourcepub fn routing_events(&self) -> Vec<AutoRoutingEvent>
pub fn routing_events(&self) -> Vec<AutoRoutingEvent>
Returns routing ledger events recorded by execute and flush calls.
Trait Implementations§
Source§impl Clone for AutoTensorExecutor
impl Clone for AutoTensorExecutor
Source§fn clone(&self) -> AutoTensorExecutor
fn clone(&self) -> AutoTensorExecutor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for AutoTensorExecutor
impl Default for AutoTensorExecutor
Source§impl TensorExecutor for AutoTensorExecutor
impl TensorExecutor for AutoTensorExecutor
Source§fn card(&self) -> TensorExecutorCard
fn card(&self) -> TensorExecutorCard
Returns the executor descriptor.
Source§fn execute(
&self,
cx: &mut Cx,
request: TensorRequest,
) -> Result<TensorExecution, TensorExecError>
fn execute( &self, cx: &mut Cx, request: TensorRequest, ) -> Result<TensorExecution, TensorExecError>
Executes one checked tensor request.
Source§fn flush(&self) -> Result<SubmissionEvidence, TensorExecError>
fn flush(&self) -> Result<SubmissionEvidence, TensorExecError>
Flushes accepted submissions and returns synchronization evidence.
Auto Trait Implementations§
impl Freeze for AutoTensorExecutor
impl RefUnwindSafe for AutoTensorExecutor
impl Send for AutoTensorExecutor
impl Sync for AutoTensorExecutor
impl Unpin for AutoTensorExecutor
impl UnsafeUnpin for AutoTensorExecutor
impl UnwindSafe for AutoTensorExecutor
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