Skip to main content

MultiRunnerClient

Enum MultiRunnerClient 

Source
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§

§

B1(Runner<B1>)

§

B2(Runner<B2>)

§

B3(Runner<B3>)

§

B4(Runner<B4>)

Trait Implementations§

Source§

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>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<B1: BackendIr, B2: BackendIr, B3: BackendIr, B4: BackendIr> RunnerClient for MultiRunnerClient<B1, B2, B3, B4>

Source§

type Device = MultiDevice<B1, B2, B3, B4>

Device type.
Source§

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>>

Read the values contained by a tensor.
Source§

fn register_tensor_data(&self, data: TensorData) -> RouterTensor<Self>

Create a new RouterTensor from the tensor data.
Source§

fn device(&self) -> Self::Device

Get the current device used by all operations handled by this client.
Source§

fn sync(&self) -> Result<(), ExecutionError>

Sync the runner, ensure that all computations are finished.
Source§

fn seed(&self, seed: u64)

Seed the runner.
Source§

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

Whether the type is supported.
Source§

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>
where <B1 as Backend>::Device: Freeze, <B2 as Backend>::Device: Freeze, <B3 as Backend>::Device: Freeze, <B4 as Backend>::Device: Freeze,

§

impl<B1, B2, B3, B4> RefUnwindSafe for MultiRunnerClient<B1, B2, B3, B4>

§

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>
where <B1 as Backend>::Device: Unpin, <B2 as Backend>::Device: Unpin, <B3 as Backend>::Device: Unpin, <B4 as Backend>::Device: Unpin,

§

impl<B1, B2, B3, B4> UnwindSafe for MultiRunnerClient<B1, B2, B3, B4>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V