Skip to main content

cudaGraphInstantiateWithFlags

Function cudaGraphInstantiateWithFlags 

Source
pub unsafe extern "C" fn cudaGraphInstantiateWithFlags(
    pGraphExec: *mut cudaGraphExec_t,
    graph: cudaGraph_t,
    flags: c_ulonglong,
) -> cudaError_t
Expand description

Creates an executable graph from a graph.

Instantiates graph as an executable graph. The graph is validated for any structural constraints or intra-node constraints which were not previously validated. If instantiation is successful, a handle to the instantiated graph is returned in pGraphExec.

The flags parameter controls the behavior of instantiation and subsequent graph launches. Valid flags are:

If graph contains any allocation or free nodes, there can be at most one executable graph in existence for that graph at a time. An attempt to instantiate a second executable graph before destroying the first with cudaGraphExecDestroy will result in an error. The same also applies if graph contains any device-updatable kernel nodes.

If graph contains kernels which call device-side cudaGraphLaunch from multiple devices, this will result in an error.

Graphs instantiated for launch on the device have additional restrictions which do not apply to host graphs.

ยงParameters

  • pGraphExec: Returns instantiated graph.
  • graph: Graph to instantiate.
  • flags: Flags to control instantiation. See ::CUgraphInstantiate_flags.