pub struct CapturedCudaGraph { /* private fields */ }Expand description
Instantiated CUDA Graph with owned graph + exec handles.
Implementations§
Source§impl CapturedCudaGraph
impl CapturedCudaGraph
Sourcepub fn capture_on_stream<F>(stream: &CudaStream, record: F) -> Result<Self>
pub fn capture_on_stream<F>(stream: &CudaStream, record: F) -> Result<Self>
Capture work submitted by record on stream, instantiate it, and take
ownership of the resulting graph handles.
Sourcepub fn launch(&self, stream: &CudaStream) -> Result<()>
pub fn launch(&self, stream: &CudaStream) -> Result<()>
Replay the instantiated graph on stream.
Sourcepub fn node_count(&self) -> Result<usize>
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.
Sourcepub fn nodes(&self) -> Result<Vec<CudaGraphNode>>
pub fn nodes(&self) -> Result<Vec<CudaGraphNode>>
Return graph nodes in CUDA’s captured graph order with their node type.
Sourcepub fn kernel_node_params(
&self,
node: CudaGraphNode,
) -> Result<CUDA_KERNEL_NODE_PARAMS>
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.
Sourcepub unsafe fn set_kernel_node_params(
&self,
node: CudaGraphNode,
params: &CUDA_KERNEL_NODE_PARAMS,
) -> Result<()>
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.
Sourcepub fn memset_node_params(
&self,
node: CudaGraphNode,
) -> Result<CUDA_MEMSET_NODE_PARAMS>
pub fn memset_node_params( &self, node: CudaGraphNode, ) -> Result<CUDA_MEMSET_NODE_PARAMS>
Read CUDA’s raw memset-node params for inventory/update code.
Sourcepub fn set_memset_node_params(
&self,
node: CudaGraphNode,
params: &CUDA_MEMSET_NODE_PARAMS,
stream: &CudaStream,
) -> Result<()>
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.
Sourcepub fn exec(&self) -> CUgraphExec
pub fn exec(&self) -> CUgraphExec
Raw instantiated graph handle for low-level graph-exec update code.