Skip to main content

Module graph

Module graph 

Source
Expand description

CUDA Graphs — record a sequence of operations once, replay cheaply.

Two construction paths:

  1. Stream capture (Stream::begin_capture, Stream::end_capture) — run your work normally on a stream; the driver records it into a graph instead of executing it. This is the recommended entry point for most users.
  2. Explicit construction (Graph::new) — build a graph node by node. baracuda v0.1 does not yet expose typed node builders; use capture for now.

Either way, instantiate the Graph to a GraphExec and launch it on any stream as many times as you like.

Modules§

instantiate_flags
Re-export of cuGraphInstantiateWithFlags flag constants.

Structs§

Graph
A CUDA graph — a DAG of CUDA operations.
GraphExec
An instantiated (executable) CUDA graph.
GraphNode
A node inside a Graph. Lightweight handle that borrows the parent graph’s storage — destroying the graph invalidates all of its nodes.
UpdateResult
Outcome of GraphExec::update. Inspect result against the constants in baracuda_cuda_sys::types::CUgraphExecUpdateResultSUCCESS (0) means the executable graph was patched in place.

Enums§

CaptureMode
Stream-capture mode, matching CUstreamCaptureMode.

Functions§

device_graph_mem_attribute
Query a CUgraphMem_attribute (used / reserved memory, high-water marks) — see baracuda_cuda_sys::types::CUgraphMem_attribute.
device_graph_mem_trim
Trim the per-device graph-mem reserve back to the minimum footprint.
device_set_graph_mem_attribute
Reset a CUgraphMem_attribute (typically the high-water marks).