Skip to main content

cudaGraphExecMemcpyNodeSetParamsFromSymbol

Function cudaGraphExecMemcpyNodeSetParamsFromSymbol 

Source
pub unsafe extern "C" fn cudaGraphExecMemcpyNodeSetParamsFromSymbol(
    hGraphExec: cudaGraphExec_t,
    node: cudaGraphNode_t,
    dst: *mut c_void,
    symbol: *const c_void,
    count: size_t,
    offset: size_t,
    kind: cudaMemcpyKind,
) -> cudaError_t
Expand description

Sets the parameters for a memcpy node in the given graphExec to copy from a symbol on the device.

Updates the work represented by node in hGraphExec as though node had contained the given params at instantiation. node must remain in the graph which was used to instantiate hGraphExec. Changed edges to and from node are ignored.

symbol and dst must be allocated from the same contexts as the original source and destination memory. The instantiation-time memory operands must be 1-dimensional. Zero-length operations are not supported.

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

Returns cudaError_t::CUDA_ERROR_INVALID_VALUE if the memory operands’ mappings changed or the original memory operands are multidimensional.

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

  • hGraphExec: The executable graph in which to set the specified node.
  • node: Memcpy node from the graph which was used to instantiate graphExec.
  • dst: Destination memory address.
  • symbol: Device symbol address.
  • count: Size in bytes to copy.
  • offset: Offset from start of symbol in bytes.
  • kind: Type of transfer.

§Return value

See also: cudaGraphAddMemcpyNode, cudaGraphAddMemcpyNodeFromSymbol, cudaGraphMemcpyNodeSetParams, cudaGraphMemcpyNodeSetParamsFromSymbol, cudaGraphExecMemcpyNodeSetParams, cudaGraphExecMemcpyNodeSetParamsToSymbol, cudaGraphExecKernelNodeSetParams, cudaGraphExecMemsetNodeSetParams, cudaGraphExecHostNodeSetParams, cudaGraphExecChildGraphNodeSetParams, cudaGraphExecEventRecordNodeSetEvent, cudaGraphExecEventWaitNodeSetEvent, cudaGraphExecExternalSemaphoresSignalNodeSetParams, cudaGraphExecExternalSemaphoresWaitNodeSetParams, cudaGraphExecUpdate, cudaGraphInstantiate.