cuda.bindings._v2.driver.graph_add_node_v2#
- cuda.bindings._v2.driver.graph_add_node_v2(
- intptr_t h_graph,
- dependencies,
- dependency_data,
- node_params,
Adds a node of arbitrary type to a graph.
Creates a new node in
h_graphdescribed bynode_paramswithlen(dependencies)dependencies specified viadependencies.len(dependencies)may be 0.dependenciesmay be null iflen(dependencies)is 0.dependenciesmay not have any duplicate entries.node_paramsis a tagged union. The node type should be specified in thetypenamefield, and type-specific parameters in the corresponding union member. All unused bytes - that is,reserved0and all bytes past the utilized union member - must be set to zero. It is recommended to use brace initialization or memset to ensure all bytes are initialized. Note that for some node types,node_paramsmay contain “out parameters” which are modified during the call, such asnode_params->alloc.dptr. A handle to the new node will be returned inph_graph_node.- 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), orNonefor NULL.
dependency_data (GraphEdgeData) –
Optional edge data for the dependencies. If NULL, the data is assumed to be default (zeroed) for all dependencies. It must be:
a
GraphEdgeData, orNonefor NULL.
node_params (intptr_t) – Specification of the node.
- Returns:
Returns newly created node.
- Return type:
intptr_t
See also
cuGraphAddNode_v2