pub enum MultiRunnerClient<B1: BackendIr, B2: BackendIr, B3: BackendIr, B4: BackendIr> {
B1(Runner<B1>),
B2(Runner<B2>),
B3(Runner<B3>),
B4(Runner<B4>),
}Expand description
A local client with multiple runners (each responsible to execute tensor operations on a given backend).
Variants§
Trait Implementations§
Source§impl<B1: Clone + BackendIr, B2: Clone + BackendIr, B3: Clone + BackendIr, B4: Clone + BackendIr> Clone for MultiRunnerClient<B1, B2, B3, B4>
impl<B1: Clone + BackendIr, B2: Clone + BackendIr, B3: Clone + BackendIr, B4: Clone + BackendIr> Clone for MultiRunnerClient<B1, B2, B3, B4>
Source§fn clone(&self) -> MultiRunnerClient<B1, B2, B3, B4>
fn clone(&self) -> MultiRunnerClient<B1, B2, B3, B4>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<B1: BackendIr, B2: BackendIr, B3: BackendIr, B4: BackendIr> RunnerClient for MultiRunnerClient<B1, B2, B3, B4>
impl<B1: BackendIr, B2: BackendIr, B3: BackendIr, B4: BackendIr> RunnerClient for MultiRunnerClient<B1, B2, B3, B4>
Source§type Device = MultiDevice<B1, B2, B3, B4>
type Device = MultiDevice<B1, B2, B3, B4>
Device type.
Source§fn register_op(&self, op: OperationIr)
fn register_op(&self, op: OperationIr)
Register a new tensor operation to be executed by the (runner) server.
Source§fn read_tensor_async(
&self,
tensor: TensorIr,
) -> DynFut<Result<TensorData, ExecutionError>>
fn read_tensor_async( &self, tensor: TensorIr, ) -> DynFut<Result<TensorData, ExecutionError>>
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 device(&self) -> Self::Device
fn device(&self) -> Self::Device
Get the current device used by all operations handled by this client.
Source§fn sync(&self) -> Result<(), ExecutionError>
fn sync(&self) -> Result<(), ExecutionError>
Sync the runner, ensure that all computations are finished.
Source§fn create_empty_handle(&self) -> TensorId
fn create_empty_handle(&self) -> TensorId
Create a new (uninitialized) empty tensor and returns its corresponding tensor id.
Source§fn supports_dtype(&self, dtype: DType) -> bool
fn supports_dtype(&self, dtype: DType) -> bool
Whether the type is supported.
Source§fn register(&self, op: OperationIr) -> Vec<RouterTensor<Self>>
fn register(&self, op: OperationIr) -> Vec<RouterTensor<Self>>
Register a new tensor operation to be executed by the (runner) server. Read more
Auto Trait Implementations§
impl<B1, B2, B3, B4> Freeze for MultiRunnerClient<B1, B2, B3, B4>
impl<B1, B2, B3, B4> RefUnwindSafe for MultiRunnerClient<B1, B2, B3, B4>where
<B1 as Backend>::Device: RefUnwindSafe,
<B2 as Backend>::Device: RefUnwindSafe,
<B3 as Backend>::Device: RefUnwindSafe,
<B4 as Backend>::Device: RefUnwindSafe,
impl<B1, B2, B3, B4> Send for MultiRunnerClient<B1, B2, B3, B4>
impl<B1, B2, B3, B4> Sync for MultiRunnerClient<B1, B2, B3, B4>
impl<B1, B2, B3, B4> Unpin for MultiRunnerClient<B1, B2, B3, B4>
impl<B1, B2, B3, B4> UnwindSafe for MultiRunnerClient<B1, B2, B3, B4>where
<B1 as Backend>::Device: UnwindSafe,
<B2 as Backend>::Device: UnwindSafe,
<B3 as Backend>::Device: UnwindSafe,
<B4 as Backend>::Device: UnwindSafe,
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