pub struct Runner<B: BackendIr> { /* private fields */ }
Expand description
A runner is responsible for executing tensor operations for a given intermediate backend.
Implementations§
Source§impl<B: BackendIr> Runner<B>
impl<B: BackendIr> Runner<B>
Sourcepub fn register_tensor_data_id(&self, id: TensorId, data: TensorData)
pub fn register_tensor_data_id(&self, id: TensorId, data: TensorData)
Register a tensor from its data and id.
Sourcepub fn register_tensor_data_desc(&self, data: TensorData) -> TensorIr
pub fn register_tensor_data_desc(&self, data: TensorData) -> TensorIr
Register a tensor and returns its intermediate representation.
Trait Implementations§
Source§impl<B: BackendIr> RunnerClient for Runner<B>
impl<B: BackendIr> RunnerClient for Runner<B>
Source§fn register(&self, op: OperationIr)
fn register(&self, op: OperationIr)
Execute a tensor operation.
Source§fn read_tensor(&self, tensor: TensorIr) -> DynFut<TensorData>
fn read_tensor(&self, tensor: TensorIr) -> DynFut<TensorData>
Read the values contained by a tensor.
Source§fn register_tensor_data(&self, data: TensorData) -> RouterTensor<Self>
fn register_tensor_data(&self, data: TensorData) -> RouterTensor<Self>
Create a new RouterTensor from the tensor data.
Source§fn register_empty_tensor(
&self,
shape: Vec<usize>,
dtype: DType,
) -> RouterTensor<Self>
fn register_empty_tensor( &self, shape: Vec<usize>, dtype: DType, ) -> RouterTensor<Self>
Create a new RouterTensor with no resources associated.
Source§fn register_float_tensor(
&self,
shape: Vec<usize>,
dtype: FloatDType,
) -> RouterTensor<Self>
fn register_float_tensor( &self, shape: Vec<usize>, dtype: FloatDType, ) -> RouterTensor<Self>
Create a new float RouterTensor with no resources associated.
Auto Trait Implementations§
impl<B> Freeze for Runner<B>
impl<B> RefUnwindSafe for Runner<B>
impl<B> Send for Runner<B>
impl<B> Sync for Runner<B>
impl<B> Unpin for Runner<B>
impl<B> UnwindSafe for Runner<B>
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