Skip to main content

cudaGraphAddMemcpyNodeFromSymbol

Function cudaGraphAddMemcpyNodeFromSymbol 

Source
pub unsafe extern "C" fn cudaGraphAddMemcpyNodeFromSymbol(
    pGraphNode: *mut cudaGraphNode_t,
    graph: cudaGraph_t,
    pDependencies: *const cudaGraphNode_t,
    numDependencies: size_t,
    dst: *mut c_void,
    symbol: *const c_void,
    count: size_t,
    offset: size_t,
    kind: cudaMemcpyKind,
) -> cudaError_t
Expand description

Creates a memcpy node to copy from a symbol on the device and adds it to a graph.

Creates a new memcpy node to copy from symbol and adds it to graph with numDependencies dependencies specified via pDependencies. It is possible for numDependencies to be 0, in which case the node will be placed at the root of the graph. pDependencies may not have any duplicate entries. A handle to the new node will be returned in pGraphNode.

When the graph is launched, the node will copy count bytes from the memory area pointed to by offset bytes from the start of symbol symbol to the memory area pointed to by dst. The memory areas may not overlap. symbol is a variable that resides in global or constant memory space. kind can be either cudaMemcpyKind::cudaMemcpyDeviceToHost, cudaMemcpyKind::cudaMemcpyDeviceToDevice, or cudaMemcpyKind::cudaMemcpyDefault. Passing cudaMemcpyKind::cudaMemcpyDefault is recommended, in which case the type of transfer is inferred from the pointer values. However, cudaMemcpyKind::cudaMemcpyDefault is only allowed on systems that support unified virtual addressing.

Memcpy nodes have some additional restrictions with regards to managed memory, if the system contains at least one device which has a zero value for the device attribute cudaDevAttrConcurrentManagedAccess.

ยงParameters

  • pGraphNode: Returns newly created node.
  • graph: Graph to which to add the node.
  • pDependencies: Dependencies of the node.
  • numDependencies: Number of dependencies.
  • 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.