pub struct CaptureScope { /* private fields */ }Expand description
Token passed to a CaptureDevice::capture_scope closure.
Call complete after recording the operations in the scope. The closure’s
return type requires the resulting completion token, so a successful capture cannot omit its
explicit graph boundaries.
Implementations§
Source§impl CaptureScope
impl CaptureScope
Sourcepub fn complete(
self,
inputs: impl IntoIterator<Item = TensorId>,
outputs: impl IntoIterator<Item = TensorId>,
) -> CompletedCaptureScope
pub fn complete( self, inputs: impl IntoIterator<Item = TensorId>, outputs: impl IntoIterator<Item = TensorId>, ) -> CompletedCaptureScope
Complete the scope with ordered runtime input and graph output tensor IDs.
Module parameters and other initialized constants should not be listed as runtime inputs;
their retained tensor values remain available in CapturedGraph::values.
The active session is closed before this returns; subsequent operations through tensors or
the capture device are rejected even if the closure has not returned yet.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CaptureScope
impl !UnwindSafe for CaptureScope
impl Freeze for CaptureScope
impl Send for CaptureScope
impl Sync for CaptureScope
impl Unpin for CaptureScope
impl UnsafeUnpin for CaptureScope
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