Expand description
CUDA Graphs (Runtime API).
Two construction paths match the Driver-side API:
- Stream capture (
Stream::begin_capture,Stream::end_capture) — run your work on a stream; CUDA records it into a graph instead of executing. This is the usual path for applications. - Explicit construction (
Graph::new) — empty graph, add nodes by hand via the runtime’scudaGraphAdd*Nodefunctions (baracuda-runtime doesn’t expose typed builders for those yet — use stream capture, or drop down to the raw PFNs).
Either way, Graph::instantiate compiles to GraphExec, and
GraphExec::launch runs it on any stream.
Structs§
- Graph
- A CUDA graph — DAG of operations, replayable via
Graph::instantiate. - Graph
Exec - An instantiated (executable) CUDA graph.
- Graph
Node - A node inside a
Graph. LightweightCopyhandle that borrows the parent graph’s storage. - Update
Result - Outcome of
GraphExec::update.resultis acudaGraphExecUpdateResultcode —SUCCESS(0) means the executable graph was patched in place.
Enums§
- Capture
Mode - Stream-capture mode (matches
cudaStreamCaptureMode).