cuda.bindings._v2.driver.graph_add_memcpy_node#

cuda.bindings._v2.driver.graph_add_memcpy_node(
intptr_t h_graph,
dependencies,
copy_params,
intptr_t ctx,
) → intptr_t#

Creates a memcpy node and adds it to a graph.

Creates a new memcpy node and adds it to h_graph with len(dependencies) dependencies specified via dependencies. It is possible for len(dependencies) to be 0, in which case the node will be placed at the root of the graph. dependencies may not have any duplicate entries. A handle to the new node will be returned in ph_graph_node. When the graph is launched, the node will perform the memcpy described by copy_params. See cuMemcpy3D() for a description of the structure and its restrictions. 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 CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS. If one or more of the operands refer to managed memory, then using the memory type CU_MEMORYTYPE_UNIFIED is disallowed for those operand(s). The managed memory will be treated as residing on either the host or the device, depending on which memory type is specified.

Parameters:
  • h_graph (intptr_t) – Graph to which to add the node.

  • dependencies (object) –

    Dependencies of the node. It must be:

    • a Python sequence of ints (as pointer addresses), or

    • None for NULL.

  • copy_params (intptr_t) – Parameters for the memory copy.

  • ctx (intptr_t) – Context on which to run the node.

Returns:

Returns newly created node.

Return type:

intptr_t

Note

This function will be deprecated in a future CUDA release. Please migrate to cuGraphAddNode.

See also

cuGraphAddMemcpyNode