Skip to main content

GraphLaunchCapture

Struct GraphLaunchCapture 

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

Captures a sequence of kernel launches for graph-based replay.

Create with begin, record launches with record_launch, and finalise with end to obtain the list of recorded operations.

This is a host-side recording facility. On systems with GPU support, the recorded operations can be converted into a CUDA graph for optimised replay via the oxicuda-driver graph API.

Implementations§

Source§

impl GraphLaunchCapture

Source

pub fn begin() -> Self

Begins a new graph launch capture session.

Returns a capture object in the active state. Record launches using record_launch and finalise with end.

Source

pub fn record_launch(&mut self, kernel: &Kernel, params: &LaunchParams)

Records a kernel launch into the capture sequence.

The kernel name and launch parameters are snapshot at the time of recording. If the capture is not active (i.e., end has already been called), this method is a no-op.

Source

pub fn record_raw( &mut self, kernel_name: impl Into<String>, params: LaunchParams, )

Records a kernel launch directly from a kernel name and params.

This is a lower-level variant of record_launch that does not require a Kernel handle — useful for testing and for replaying recorded descriptions.

Source

pub fn end(self) -> Vec<LaunchRecord>

Ends the capture session and returns all recorded launches.

After calling this method, the capture is no longer active and further calls to record_launch are ignored.

Source

pub fn len(&self) -> usize

Returns the number of launches recorded so far.

Source

pub fn is_empty(&self) -> bool

Returns true if no launches have been recorded.

Source

pub fn is_active(&self) -> bool

Returns true if the capture is currently active.

Trait Implementations§

Source§

impl Debug for GraphLaunchCapture

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. 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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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, 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<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more