cuda.bindings._v2.driver.graph_get_edges#

cuda.bindings._v2.driver.graph_get_edges(h_graph)#

graph_get_edges_v2(intptr_t h_graph) -> tuple

Returns a graph’s dependency edges.

Returns a list of h_graph's dependency edges. Edges are returned via corresponding indices in from_, to and edge_data; that is, the node in to[i] has a dependency on the node in from_[i] with data edge_data[i]. from_ and to may both be NULL, in which case this function only returns the number of edges in num_edges. Otherwise, num_edges entries will be filled in. If num_edges is higher than the actual number of edges, the remaining entries in from_ and to will be set to NULL, and the number of edges actually returned will be written to num_edges. edge_data may alone be NULL, in which case the edges must all have default (zeroed) edge data. Attempting a lossy query via NULL edge_data will result in CUDA_ERROR_LOSSY_QUERY. If edge_data is non-NULL then from_ and to must be as well.

Parameters:

h_graph (intptr_t) – Graph to get the edges from.

Returns:

  • intptr_t: Location to return edge endpoints.

  • intptr_t: Location to return edge endpoints.

  • CUgraphEdgeData: Optional location to return edge data.

Return type:

A 3-tuple containing

See also

cuGraphGetEdges_v2