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/10/26 08:39:13 UTC

[GitHub] [tvm] mikepapadim commented on a change in pull request #9367: BUG: FoldConstant can see through on_device annotations.

mikepapadim commented on a change in pull request #9367:
URL: https://github.com/apache/tvm/pull/9367#discussion_r736292108



##########
File path: tests/python/relay/test_pass_fold_constant.py
##########
@@ -68,14 +72,14 @@ def expected():
         x = relay.var("x", t)
         c_folded = (c_data + c_data) * 2
         y = relay.add(x, relay.const(c_folded))
-        z = relay.add(y, relay.const(c_data))
+        z = relay.add(y, make_const(c_data))
         return relay.Function([x], z)
 
     # the fold constant should work on any context.
     with tvm.target.Target("cuda"):
         zz = run_opt_pass(before(), transform.FoldConstant())
     zexpected = run_opt_pass(expected(), transform.InferType())
-    assert tvm.ir.structural_equal(zz, zexpected)
+    tvm.ir.assert_structural_equal(zz, zexpected)

Review comment:
       CI fails on the constant folding tests, it might be the asserts directly on IR equality.  




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org