Skip to main content

cudaGraphExecNodeSetParams

Function cudaGraphExecNodeSetParams 

Source
pub unsafe extern "C" fn cudaGraphExecNodeSetParams(
    graphExec: cudaGraphExec_t,
    node: cudaGraphNode_t,
    nodeParams: *mut cudaGraphNodeParams,
) -> cudaError_t
Expand description

Update a graph node’s parameters in an instantiated graph.

Sets the parameters of a node in an executable graph graphExec. The node is identified by the corresponding node node in the non-executable graph from which the executable graph was instantiated. node must not have been removed from the original graph.

The modifications only affect future launches of graphExec. Already enqueued or running launches of graphExec are not affected by this call. node is also not modified by this call.

Allowed changes to parameters on executable graphs are as follows:

Node typeAllowed changes
kernelSee cudaGraphExecKernelNodeSetParams
memcpyAddresses for 1-dimensional copies if allocated in same context; see cudaGraphExecMemcpyNodeSetParams
memsetAddresses for 1-dimensional memsets if allocated in same context; see cudaGraphExecMemsetNodeSetParams
hostUnrestricted
child graphTopology must match and restrictions apply recursively; see cudaGraphExecUpdate
event waitUnrestricted
event recordUnrestricted
external semaphore signalNumber of semaphore operations cannot change
external semaphore waitNumber of semaphore operations cannot change
memory allocationAPI unsupported
memory freeAPI unsupported

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

  • graphExec: The executable graph in which to update the specified node.
  • node: Corresponding node from the graph from which graphExec was instantiated.
  • nodeParams: Updated Parameters to set.

§Return value

See also: cudaGraphAddNode, cudaGraphNodeSetParams, cudaGraphExecUpdate, cudaGraphInstantiate.