Expand description
CUDA Graph capture backend.
Converts an ExecutionPlan into an oxicuda_driver::graph::Graph,
which can be instantiated and launched with minimal CPU overhead via the
CUDA driver’s graph API.
§Mapping
PlanStep | driver::graph::GraphNode |
|---|---|
KernelLaunch | GraphNode::KernelLaunch |
Memcpy | GraphNode::Memcpy |
Memset | GraphNode::Memset |
Barrier | GraphNode::Empty |
EventRecord/Wait | GraphNode::Empty (sync barrier) |
HostCallback | GraphNode::Empty (placeholder) |
The dependency edges from the original plan are preserved: each step depends on all steps that produced an event it is waiting for.
§Limitations
- Stream-parallel execution is not yet mapped to separate CUDA stream
arguments — all nodes are enqueued on the same graph-internal stream.
Proper multi-stream CUDA graph support requires the
cuGraphAddNodeAPI withcuGraphNodeParams, which is future work. EventRecord/EventWaitsteps collapse intoEmptynodes with a dependency edge, which enforces ordering without the overhead of true event signalling within a CUDA graph.
Functions§
- capture
- Captures an
ExecutionPlaninto adriver::graph::Graph.