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
impl GraphLaunchCapture
Sourcepub fn begin() -> Self
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.
Sourcepub fn record_launch(&mut self, kernel: &Kernel, params: &LaunchParams)
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.
Sourcepub fn record_raw(
&mut self,
kernel_name: impl Into<String>,
params: LaunchParams,
)
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.
Sourcepub fn end(self) -> Vec<LaunchRecord>
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.