Skip to main content

cudaGraphCreate

Function cudaGraphCreate 

Source
pub unsafe extern "C" fn cudaGraphCreate(
    pGraph: *mut cudaGraph_t,
    flags: c_uint,
) -> cudaError_t
Expand description

Creates a graph.

Creates an empty graph, which is returned via pGraph.

Note: Graph objects are not threadsafe. More here.

Note that this function may also return error codes from previous, asynchronous launches.

Note that this function may also return cudaError_t::CUDA_ERROR_NOT_INITIALIZED, cudaErrorInsufficientDriver or cudaError_t::CUDA_ERROR_NO_DEVICE if this call tries to initialize internal CUDA RT state.

Note that as specified by cudaStreamAddCallback no CUDA function may be called from callback. cudaError_t::CUDA_ERROR_NOT_PERMITTED may, but is not guaranteed to, be returned as a diagnostic in such case.

§Parameters

  • pGraph: Returns newly created graph.
  • flags: Graph creation flags, must be 0.

§Return value

See also: cudaGraphAddChildGraphNode, cudaGraphAddEmptyNode, cudaGraphAddKernelNode, cudaGraphAddHostNode, cudaGraphAddMemcpyNode, cudaGraphAddMemsetNode, cudaGraphInstantiate, cudaGraphDestroy, cudaGraphGetNodes, cudaGraphGetRootNodes, cudaGraphGetEdges, cudaGraphClone.