Skip to main content

CaptureClient

Struct CaptureClient 

Source
pub struct CaptureClient { /* private fields */ }
Expand description

Client that records router operations and locally retains initialized values.

Trait Implementations§

Source§

impl Clone for CaptureClient

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl RouterClient for CaptureClient

Source§

type Device = CaptureDevice

Device type.
Source§

fn register_op(&self, op: OperationIr)

Register a new tensor operation to be executed by the interpreter (server).
Source§

fn read_tensor_async( &self, tensor: TensorIr, ) -> DynFut<Result<TensorData, ExecutionError>>

Read the values contained by a tensor.
Source§

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

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

fn flush(&self)

Eagerly submit the operations registered so far without waiting for them to complete. Read more
Source§

fn create_empty_handle(&self) -> TensorId

Create a new (uninitialized) empty tensor and returns its corresponding tensor id.
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 seed(&self, _seed: u64)

Seed the interpreter.
Source§

fn dtype_usage(&self, dtype: DType) -> DTypeUsageSet

Returns the supported data type usage set
Source§

fn register_and_execute_graph( &self, graph_id: GraphId, relative_graph: Vec<OperationIr>, bindings: GraphBindings, )

Register a reusable group of operations (in relative form) under graph_id and run its first invocation with bindings, so it can later be replayed by id with execute_graph. Read more
Source§

fn execute_graph(&self, graph_id: GraphId, bindings: GraphBindings)

Replay a previously registered graph with the given concrete bindings.
Source§

fn register_alias(&self, new_id: TensorId, src_id: TensorId)

Register new_id as an alias of src_id — a second handle over the same backing buffer. Read more
Source§

fn register(&self, op: OperationIr) -> Vec<RouterTensor<Self>>

Register a new tensor operation to be executed by the interpreter (server). Read more
Source§

fn profile_start(&self) -> Result<Option<ProfileToken>, ExecutionError>

Open a profiling window on the interpreter, where the calling stream stands — see Backend::profile_start. Read more
Source§

fn profile_end( &self, token: ProfileToken, options: ProfileOptions, ) -> Result<ProfileDuration, ExecutionError>

Close the window token where the calling stream stands, flushing the interpreter’s backend first when options ask for it.
Source§

fn profile_abandon(&self, token: ProfileToken)

Drop the window token without measuring it, for a caller that will never reach profile_end — see Backend::profile_abandon. Read more

Auto Trait Implementations§

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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

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

fn try_from(value: U) -> Result<T, !>

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.