Expand description
Conditional graph nodes (cudaGraphConditionalNode, CUDA 12.4+).
Gated behind the graphs-conditional Cargo feature. Even with the
feature on, the [GraphActor] runtime probe disables the path on
older drivers — IfNodeDescriptor::record returns
Unrecoverable("conditional graphs unsupported") if the
cuGraphConditionalHandleCreate symbol can’t be resolved.
Public surface:
ConditionalKind—IforWhile.IfNodeDescriptor/WhileNodeDescriptor— typed descriptors carrying the inner graph that will be replayed when the predicate is non-zero.
Structs§
- IfNode
Descriptor - Descriptor for an
If-style conditional node. The inner graph is out-parameter-allocated by CUDA when the node is created — callers receive its handle back so they can populate it before exec instantiation. - While
Node Descriptor - Descriptor for a
While-style conditional node.
Enums§
- Conditional
Kind - Kind of conditional node. Matches
CU_GRAPH_COND_TYPE_*.
Functions§
- build_
params - Build the raw
CUDA_CONDITIONAL_NODE_PARAMSforkindagainstparent’s context. The returned struct embeds an out-pointer (phGraph_out) that CUDA fills with the inner graph; the actor adds it to the parent viacuGraphAddNode_v2. - driver_
supports_ conditional - Probe whether the running CUDA driver supports conditional graphs.
Returns
Ok(true)ifcuGraphConditionalHandleCreateis callable (i.e. CUDA ≥ 12.4 with the symbol present);Ok(false)otherwise;Err(GpuError::Unrecoverable)if the loader panics.