pub unsafe extern "C" fn cudaGraphClone(
pGraphClone: *mut cudaGraph_t,
originalGraph: cudaGraph_t,
) -> cudaError_tExpand description
Clones a graph.
This function creates a copy of originalGraph and returns it in pGraphClone. All parameters are copied into the cloned graph. The original graph may be modified after this call without affecting the clone.
Child graph nodes in the original graph are recursively copied into the clone.
Note: Cloning is not supported for graphs which contain memory allocation nodes, memory free nodes, or conditional nodes.
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
pGraphClone: Returns newly created cloned graph.originalGraph: Graph to clone.
§Return value
cudaError_t::CUDA_SUCCESScudaError_t::CUDA_ERROR_INVALID_VALUEcudaError_t::CUDA_ERROR_OUT_OF_MEMORY
See also: cudaGraphCreate, cudaGraphNodeFindInClone.