MCPcopy Create free account
hub / github.com/apache/tvm / test_eq_ops

Function test_eq_ops

tests/python/tirx-base/test_tir_base.py:177–189  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

175
176
177def test_eq_ops():
178 # NOTE: the `== None` / `!= None` below are intentional and must NOT be
179 # rewritten as `is None` / `is not None`. This test exercises the overloaded
180 # `__eq__` / `__ne__` operators on `IntImm` / `StringImm`; the `is` operators
181 # bypass those overloads and would defeat the test.
182 a = tirx.IntImm("int8", 1)
183 with pytest.raises(ValueError):
184 assert a != None
185 with pytest.raises(ValueError):
186 assert not a == None
187 b = tirx.StringImm("abc")
188 assert b != None
189 assert not b == None
190
191
192if __name__ == "__main__":

Callers 1

test_tir_base.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…