pub unsafe extern "C" fn cudaGraphExecNodeSetParams(
graphExec: cudaGraphExec_t,
node: cudaGraphNode_t,
nodeParams: *mut cudaGraphNodeParams,
) -> cudaError_tExpand 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 type | Allowed changes |
|---|---|
| kernel | See cudaGraphExecKernelNodeSetParams |
| memcpy | Addresses for 1-dimensional copies if allocated in same context; see cudaGraphExecMemcpyNodeSetParams |
| memset | Addresses for 1-dimensional memsets if allocated in same context; see cudaGraphExecMemsetNodeSetParams |
| host | Unrestricted |
| child graph | Topology must match and restrictions apply recursively; see cudaGraphExecUpdate |
| event wait | Unrestricted |
| event record | Unrestricted |
| external semaphore signal | Number of semaphore operations cannot change |
| external semaphore wait | Number of semaphore operations cannot change |
| memory allocation | API unsupported |
| memory free | API 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
cudaError_t::CUDA_SUCCESScudaError_t::CUDA_ERROR_INVALID_VALUEcudaErrorInvalidDeviceFunctioncudaError_t::CUDA_ERROR_NOT_SUPPORTED
See also: cudaGraphAddNode, cudaGraphNodeSetParams, cudaGraphExecUpdate, cudaGraphInstantiate.