pub trait BackendExecutionContext: Send + Sync {
// Required methods
fn set_input(&mut self, id: Id, tensor: &Tensor) -> Result<(), BackendError>;
fn get_output(&mut self, id: Id) -> Result<Tensor, BackendError>;
fn compute(
&mut self,
inputs: Option<Vec<NamedTensor>>,
) -> Result<Option<Vec<NamedTensor>>, BackendError>;
}
Expand description
A BackendExecutionContext performs the actual inference; this is the backing implementation for a user-facing execution context.