You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/06/21 08:54:13 UTC

[GitHub] [tvm] hgt312 commented on a change in pull request #8266: [Bugfix] [tir] do not simplify 'Any() - Any()' to 0

hgt312 commented on a change in pull request #8266:
URL: https://github.com/apache/tvm/pull/8266#discussion_r655194469



##########
File path: tests/python/unittest/test_arith_rewrite_simplify.py
##########
@@ -293,6 +294,9 @@ def test_sub_index_simplify():
 
     # mul co-efficient foldng
     ck.verify(x - x, 0)
+    ck.verify(a - a, 0)
+    ck.verify(a - b, a - b)
+    ck.verify(a - b, c - c)

Review comment:
       Remove this line now. Semantically, `a - b` is not equal to `c - c`, but `structural_equal((a - b), (c-c))` works because for AnyNode it use the `SEqualReduce` function which only checks the node's dtype. In fact, a function contains AnyNode(s) in its `ret_type` after InferType will have new AnyNode(s), the two func then differs though they pass the tests.
   
   I think a long term approach should be map `Any` like `Var` when checking the structures. So just keep it for now?




-- 
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:
users@infra.apache.org