cuda.bindings._v2.driver.graph_add_batch_mem_op_node#

cuda.bindings._v2.driver.graph_add_batch_mem_op_node(
intptr_t h_graph,
dependencies,
size_t num_dependencies,
node_params,
) → intptr_t#

Creates a batch memory operation node and adds it to a graph.

Creates a new batch memory operation node and adds it to h_graph with num_dependencies dependencies specified via dependencies and arguments specified in node_params. It is possible for num_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 node is added, the paramArray inside node_params is copied and therefore it can be freed after the call returns.

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

  • dependencies (object) –

    Dependencies of the node. It can be:

    • an int as the pointer address to the array, or

    • a Python sequence of ints (as pointer addresses).

  • num_dependencies (size_t) – Number of dependencies.

  • node_params (intptr_t) – Parameters for the node.

Returns:

Returns newly created node.

Return type:

intptr_t

Note

Warning: Improper use of this API may deadlock the application. Synchronization ordering established through this API is not visible to CUDA. CUDA tasks that are (even indirectly) ordered by this API should also have that order expressed with CUDA-visible dependencies such as events. This ensures that the scheduler does not serialize them in an improper order.

See also

cuGraphAddBatchMemOpNode