Skip to main content

CapturedCudaGraph

Struct CapturedCudaGraph 

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

Instantiated CUDA Graph with owned graph + exec handles.

Implementations§

Source§

impl CapturedCudaGraph

Source

pub fn capture_on_stream<F>(stream: &CudaStream, record: F) -> Result<Self>
where F: FnOnce() -> Result<()>,

Capture work submitted by record on stream, instantiate it, and take ownership of the resulting graph handles.

Source

pub fn launch(&self, stream: &CudaStream) -> Result<()>

Replay the instantiated graph on stream.

Source

pub fn node_count(&self) -> Result<usize>

Number of nodes in the captured graph. Used by bounded CSM CUDA Graph cache-key and node-inventory certs to prove topology stability.

Source

pub fn nodes(&self) -> Result<Vec<CudaGraphNode>>

Return graph nodes in CUDA’s captured graph order with their node type.

Source

pub fn kernel_node_params( &self, node: CudaGraphNode, ) -> Result<CUDA_KERNEL_NODE_PARAMS>

Read CUDA’s raw kernel-node params for inventory/update code.

The returned kernelParams pointer is CUDA-owned capture metadata. Treat it as read-only unless constructing a fresh params object for Self::set_kernel_node_params.

Source

pub unsafe fn set_kernel_node_params( &self, node: CudaGraphNode, params: &CUDA_KERNEL_NODE_PARAMS, ) -> Result<()>

Update a kernel node in the instantiated graph.

§Safety

CUDA requires the replacement params to be topology-compatible with the captured node. The caller must keep every pointed-to kernel argument alive until CUDA has consumed the update and launched work that uses it.

Source

pub fn memset_node_params( &self, node: CudaGraphNode, ) -> Result<CUDA_MEMSET_NODE_PARAMS>

Read CUDA’s raw memset-node params for inventory/update code.

Source

pub fn set_memset_node_params( &self, node: CudaGraphNode, params: &CUDA_MEMSET_NODE_PARAMS, stream: &CudaStream, ) -> Result<()>

Update a memset node in the instantiated graph.

Source

pub fn graph(&self) -> CUgraph

Raw graph handle for low-level node inventory/update code.

Source

pub fn exec(&self) -> CUgraphExec

Raw instantiated graph handle for low-level graph-exec update code.

Trait Implementations§

Source§

impl Drop for CapturedCudaGraph

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Send for CapturedCudaGraph

Source§

impl Sync for CapturedCudaGraph

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, 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.
§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,