Expand description
Instantiated executable graph — a CPU-side model of CUDA graph instantiation and update.
On real hardware, a ComputeGraph is instantiated into an executable
graph (cudaGraphExec_t) once, and then launched many times. Between
launches the cheap thing to do is to update node parameters in place
(cudaGraphExecKernelNodeSetParams, cudaGraphExecUpdate) rather than
re-instantiate from scratch — but an in-place update is only legal when the
new topology matches the instantiated one exactly.
This module models that lifecycle purely on the CPU:
ExecGraph::instantiatevalidates aComputeGraphis a DAG and snapshots its topology (nodes + edges) and node parameters.ExecGraph::update_nodeapplies a single-node parameter update, validating the parameter shape (e.g. a kernel node may only be updated with kernel parameters, and a memcpy’s size may not change).ExecGraph::updateapplies a whole-graph update against a freshly builtComputeGraph, requiring identical topology and only differing parameters — exactly thecudaGraphExecUpdatecontract.ExecGraph::diffcomputes a structural / parameter diff against anotherComputeGraph, reporting whether an in-place update is possible at all.ExecGraph::clonepreserves the full topology of the executable graph.
No GPU is required; this is pure data-structure and validation work.
Structs§
- Exec
Graph - An instantiated executable graph: a validated topology snapshot plus the per-node parameters that an in-place update may modify.
- Exec
Graph Diff - The result of diffing an
ExecGraphagainst aComputeGraph.
Enums§
- Node
Param Update - A parameter-only update to a single instantiated node.