MCPcopy
hub / github.com/dmlc/dgl / _get_inner_node_mask

Function _get_inner_node_mask

python/dgl/distributed/partition.py:112–121  ·  view source on GitHub ↗
(graph, ntype_id)

Source from the content-addressed store, hash-verified

110
111
112def _get_inner_node_mask(graph, ntype_id):
113 if NTYPE in graph.ndata:
114 dtype = F.dtype(graph.ndata["inner_node"])
115 return (
116 graph.ndata["inner_node"]
117 * F.astype(graph.ndata[NTYPE] == ntype_id, dtype)
118 == 1
119 )
120 else:
121 return graph.ndata["inner_node"] == 1
122
123
124def _get_inner_edge_mask(graph, etype_id):

Callers 7

verify_graph_featsFunction · 0.90
verify_metadata_countsFunction · 0.90
verify_node_partitionidsFunction · 0.90
verify_hetero_graphFunction · 0.90
verify_graph_featsFunction · 0.90
_verify_dgl_partitionFunction · 0.85
partition_graphFunction · 0.85

Calls 2

dtypeMethod · 0.45
astypeMethod · 0.45

Tested by 2

verify_hetero_graphFunction · 0.72
verify_graph_featsFunction · 0.72