MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / __init__

Method __init__

imperative/python/megengine/core/_wrap.py:9–19  ·  view source on GitHub ↗
(self, device=None)

Source from the content-addressed store, hash-verified

7
8class Device:
9 def __init__(self, device=None):
10 if device is None:
11 self._cn = CompNode()
12 elif isinstance(device, Device):
13 self._cn = device._cn
14 elif isinstance(device, CompNode):
15 self._cn = device
16 else:
17 self._cn = CompNode(device)
18
19 self._logical_name = None
20
21 @property
22 def logical_name(self):

Callers

nothing calls this directly

Calls 1

CompNodeClass · 0.85

Tested by

no test coverage detected