Expand description
CUDA Graphs — record a sequence of operations once, replay cheaply.
Two construction paths:
- 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. - 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
cuGraphInstantiateWithFlagsflag constants.
Structs§
- Graph
- A CUDA graph — a DAG of CUDA operations.
- Graph
Exec - An instantiated (executable) CUDA graph.
- Graph
Node - A node inside a
Graph. Lightweight handle that borrows the parent graph’s storage — destroying the graph invalidates all of its nodes. - Update
Result - Outcome of
GraphExec::update. Inspectresultagainst the constants inbaracuda_cuda_sys::types::CUgraphExecUpdateResult—SUCCESS(0) means the executable graph was patched in place.
Enums§
- Capture
Mode - Stream-capture mode, matching
CUstreamCaptureMode.
Functions§
- device_
graph_ mem_ attribute - Query a
CUgraphMem_attribute(used / reserved memory, high-water marks) — seebaracuda_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).