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

Method __hash__

imperative/python/megengine/xla/sharding.py:197–200  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

195 )
196
197 def __hash__(self):
198 if not hasattr(self, "_hash"):
199 self._hash = hash((tuple(self.devices.flat), self.sharding_spec))
200 return self._hash
201
202 def __str__(self):
203 device_ids = [d.id for d in self.devices.flat]

Callers

nothing calls this directly

Calls 1

hashFunction · 0.50

Tested by

no test coverage detected