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

Method __eq__

imperative/python/megengine/core/_wrap.py:40–43  ·  view source on GitHub ↗
(self, rhs)

Source from the content-addressed store, hash-verified

38 return hash(str(self._cn))
39
40 def __eq__(self, rhs):
41 if not isinstance(rhs, Device):
42 rhs = Device(rhs)
43 return self._cn == rhs._cn
44
45
46def as_device(obj):

Callers

nothing calls this directly

Calls 1

DeviceClass · 0.70

Tested by

no test coverage detected