MCPcopy Create free account
hub / github.com/apache/tvm-ffi / __hash__

Method __hash__

python/tvm_ffi/structural.py:225–229  ·  view source on GitHub ↗

Return cached structural hash.

(self)

Source from the content-addressed store, hash-verified

223 self.__init_handle_by_constructor__(_ffi_api.StructuralKey, key)
224
225 def __hash__(self) -> int:
226 """Return cached structural hash."""
227 # need to mask the result so negative values are converted to u64
228 # this is because hash value were stored as int64_t in the C++ code
229 return self.hash_i64 & 0xFFFFFFFFFFFFFFFF
230
231 def __eq__(self, other: Any) -> bool:
232 """Compare by structural equality."""

Callers 1

Calls

no outgoing calls

Tested by 1