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/01/15 01:44:16 UTC

[GitHub] [tvm] slyubomirsky opened a new pull request #7288: [BYOC][bugfix] Handle empty tuples in annotation pass

slyubomirsky opened a new pull request #7288:
URL: https://github.com/apache/tvm/pull/7288


   I ran into a small issue when constructing a test case involving the `AnnotateTarget` pass and a function returning an empty tuple -- it was inserting a `compiler_end` annotation without a corresponding `compiler_begin` annotation. It turns out there was a check missing from `InsertCompilerEndAndPropogateTarget` (it checks for calls without args but not for empty tuples). This PR inserts a check and adds a test case.
   
   Please review @zhiics @comaniac 


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



[GitHub] [tvm] comaniac commented on a change in pull request #7288: [BYOC][bugfix] Handle empty tuples in annotation pass

Posted by GitBox <gi...@apache.org>.
comaniac commented on a change in pull request #7288:
URL: https://github.com/apache/tvm/pull/7288#discussion_r557824491



##########
File path: tests/python/relay/test_pass_annotate_target.py
##########
@@ -738,8 +738,8 @@ def after():
         mod = tvm.IRModule.from_expr(func)
         return mod
 
-    for annotate_non_call_ops in [True, False, True]:
-        result = transform.AnnotateTarget(target)(before())
+    for annotate_non_call_ops in [True, False]:
+        result = transform.AnnotateTarget(target, annotate_non_call_ops)(before())

Review comment:
       Good catch. Looks like a miss.




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



[GitHub] [tvm] tqchen merged pull request #7288: [BYOC][bugfix] Handle empty tuples in annotation pass

Posted by GitBox <gi...@apache.org>.
tqchen merged pull request #7288:
URL: https://github.com/apache/tvm/pull/7288


   


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



[GitHub] [tvm] slyubomirsky commented on a change in pull request #7288: [BYOC][bugfix] Handle empty tuples in annotation pass

Posted by GitBox <gi...@apache.org>.
slyubomirsky commented on a change in pull request #7288:
URL: https://github.com/apache/tvm/pull/7288#discussion_r557810652



##########
File path: tests/python/relay/test_pass_annotate_target.py
##########
@@ -738,8 +738,8 @@ def after():
         mod = tvm.IRModule.from_expr(func)
         return mod
 
-    for annotate_non_call_ops in [True, False, True]:
-        result = transform.AnnotateTarget(target)(before())
+    for annotate_non_call_ops in [True, False]:
+        result = transform.AnnotateTarget(target, annotate_non_call_ops)(before())

Review comment:
       Changed this test because it looked incorrectly, please correct me if there was a reason the variable wasn't used

##########
File path: tests/python/relay/test_pass_annotate_target.py
##########
@@ -738,8 +738,8 @@ def after():
         mod = tvm.IRModule.from_expr(func)
         return mod
 
-    for annotate_non_call_ops in [True, False, True]:
-        result = transform.AnnotateTarget(target)(before())
+    for annotate_non_call_ops in [True, False]:
+        result = transform.AnnotateTarget(target, annotate_non_call_ops)(before())

Review comment:
       Changed this test because it looked incorrect, please correct me if there was a reason the variable wasn't used




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