pub struct CaptureClient { /* private fields */ }Expand description
Client that records router operations and locally retains initialized values.
Trait Implementations§
Source§impl Clone for CaptureClient
impl Clone for CaptureClient
Source§impl RouterClient for CaptureClient
impl RouterClient for CaptureClient
Source§type Device = CaptureDevice
type Device = CaptureDevice
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 interpreter (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 sync(&self) -> Result<(), ExecutionError>
fn sync(&self) -> Result<(), ExecutionError>
Sync the interpreter, ensure that all computations are finished.
Source§fn flush(&self)
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
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>
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 dtype_usage(&self, dtype: DType) -> DTypeUsageSet
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,
)
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 moreSource§fn execute_graph(&self, graph_id: GraphId, bindings: GraphBindings)
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)
fn register_alias(&self, new_id: TensorId, src_id: TensorId)
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 interpreter (server). Read more
Source§fn profile_start(&self) -> Result<Option<ProfileToken>, ExecutionError>
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 moreSource§fn profile_end(
&self,
token: ProfileToken,
options: ProfileOptions,
) -> Result<ProfileDuration, ExecutionError>
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)
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for CaptureClient
impl !UnwindSafe for CaptureClient
impl Freeze for CaptureClient
impl Send for CaptureClient
impl Sync for CaptureClient
impl Unpin for CaptureClient
impl UnsafeUnpin for CaptureClient
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