tqchen commented on a change in pull request #5232: [PYTHON] Make IntImm more
like an integer
URL: https://github.com/apache/incubator-tvm/pull/5232#discussion_r403321180
##########
File path: tests/python/unittest/test_tir_nodes.py
##########
@@ -302,7 +302,21 @@ def test_buffer_load_store():
assert isinstance(s, tvm.tir.BufferStore)
+def test_intimm_cond():
+ x = tvm.runtime.convert(1)
+ y = tvm.runtime.convert(1)
+ s = {x}
+ assert y in s
+ assert x == y
Review comment:
(x == y) becomes another IntImm(with value equals 1 due to constant
folding). Then calling `__bool__` of that value returns the correct value
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services