(a, b) vs (a, a) where a ≅ b — reverse map detects inconsistency.
(self)
| 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 | # --------------------------------------------------------------------------- |
nothing calls this directly
no test coverage detected