yongwww commented on code in PR #14394:
URL: https://github.com/apache/tvm/pull/14394#discussion_r1160917550


##########
tests/python/relax/test_tvmscript_parser.py:
##########
@@ -1309,6 +1309,9 @@ def add(
 
         @R.function
         def main(x: R.Tensor((2, 4), dtype="float32")) -> R.Tensor((10,), 
dtype="float32"):
+            # slight hack: normally, we would prefer to use True, but the func 
attrs, when printed,
+            # will have it as 1, so it would fail roundtripping otherwise
+            R.func_attr({"ForcePure": 1})

Review Comment:
   it related printing should be 
https://github.com/apache/tvm/blob/unity/src/script/printer/relax/function.cc#L54-L58.
 Feel free to leave a todo for me



##########
tests/python/relax/test_tvmscript_parser.py:
##########
@@ -1309,6 +1309,9 @@ def add(
 
         @R.function
         def main(x: R.Tensor((2, 4), dtype="float32")) -> R.Tensor((10,), 
dtype="float32"):
+            # slight hack: normally, we would prefer to use True, but the func 
attrs, when printed,
+            # will have it as 1, so it would fail roundtripping otherwise
+            R.func_attr({"ForcePure": 1})

Review Comment:
   the related printing should be 
https://github.com/apache/tvm/blob/unity/src/script/printer/relax/function.cc#L54-L58.
 Feel free to leave a todo for me



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

Reply via email to