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

Method test_reverse_bijection

tests/python/test_structural_py_class.py:307–313  ·  view source on GitHub ↗

(a, b) vs (a, a) where a ≅ b — reverse map detects inconsistency.

(self)

Source from the content-addressed store, hash-verified

305 assert structural_hash(dag) != structural_hash(tree)
306
307 def test_reverse_bijection(self) -> None:
308 """(a, b) vs (a, a) where a ≅ b — reverse map detects inconsistency."""
309 a = TBinding(name="a", value=1)
310 b = TBinding(name="b", value=1) # same content as a
311 lhs = tvm_ffi.Array([a, b])
312 rhs = tvm_ffi.Array([a, a]) # note: same object twice
313 assert not structural_equal(lhs, rhs)
314
315
316# ---------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 3

structural_equalFunction · 0.90
TBindingClass · 0.85
ArrayMethod · 0.80

Tested by

no test coverage detected