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

Method cpu

python/dgl/heterograph.py:5744–5756  ·  view source on GitHub ↗

Return a new copy of this graph on CPU. Returns ------- DGLGraph Graph on CPU. See Also -------- to

(self)

Source from the content-addressed store, hash-verified

5742 return ret
5743
5744 def cpu(self):
5745 """Return a new copy of this graph on CPU.
5746
5747 Returns
5748 -------
5749 DGLGraph
5750 Graph on CPU.
5751
5752 See Also
5753 --------
5754 to
5755 """
5756 return self.to(F.cpu())
5757
5758 def materialize_data(self):
5759 """Materialize the graph data on the current device.

Callers 15

prop_nodes_bfsFunction · 0.45
prop_nodes_topoFunction · 0.45
prop_edges_dfsFunction · 0.45
rand_graphFunction · 0.45
rand_bipartiteFunction · 0.45
reshuffle_graphFunction · 0.45
get_inner_edgeFunction · 0.45
record_streamMethod · 0.45

Calls 1

toMethod · 0.95

Tested by 15

test_hetero_convFunction · 0.36
test_pickling_is_pinnedFunction · 0.36
test_pin_memoryFunction · 0.36
test_subframesFunction · 0.36
test_uva_subgraphFunction · 0.36
test_createFunction · 0.36
_test_edge_idsFunction · 0.36
test_to_deviceFunction · 0.36
test_to_device2Function · 0.36
test_pin_memory_Function · 0.36
test_frame_deviceFunction · 0.36