MCPcopy Index your code
hub / github.com/dmlc/dgl / cpu

Function cpu

python/dgl/ndarray.py:54–67  ·  view source on GitHub ↗

Construct a CPU device Parameters ---------- dev_id : int, optional The integer device id Returns ------- ctx : DGLContext The created context

(dev_id=0)

Source from the content-addressed store, hash-verified

52
53
54def cpu(dev_id=0):
55 """Construct a CPU device
56
57 Parameters
58 ----------
59 dev_id : int, optional
60 The integer device id
61
62 Returns
63 -------
64 ctx : DGLContext
65 The created context
66 """
67 return DGLContext(1, dev_id)
68
69
70def gpu(dev_id=0):

Callers 2

arrayFunction · 0.70
__init__.pyFile · 0.50

Calls 1

DGLContextClass · 0.85

Tested by

no test coverage detected