wrongtest-intellif commented on code in PR #13640:
URL: https://github.com/apache/tvm/pull/13640#discussion_r1051548626
##########
tests/python/unittest/test_tvmscript_regression.py:
##########
@@ -58,7 +58,24 @@ def func_ref():
tvm.ir.assert_structural_equal(test_case, func_ref)
+def test_var_capturing_order():
+ b = 2
+
+ @T.prim_func
+ def test_case():
+ k: T.int32 = b
+
+ @T.prim_func
+ def func_ref():
+ k: T.int32 = 2
+ T.evaluate(0)
+
+ tvm.ir.assert_structural_equal(test_case, func_ref)
+
+
if __name__ == "__main__":
+ b = 1
Review Comment:
Could we put it just before line `def test_var_capturing_order():` thus
people could know what is the purpose this assignment is for. Also just for my
curiosity, what is the behavior when there are nested closures?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]