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/11/30 20:55:32 UTC

[GitHub] [tvm] AndrewZhaoLuo opened a new pull request #9615: [EZ][Autoscheduler] Log exceptions in topi lowering

AndrewZhaoLuo opened a new pull request #9615:
URL: https://github.com/apache/tvm/pull/9615


   During task extraction we might not support an operator. Right now we have an uncaught exception which gets sent to std error. Now we send it to the autoscheduler logger instead.
   
   Finally, we restore the autotvm GLOBAL_SCOPE state though I don't believe this is technically needed since the thread will end execution shortly after.


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



[GitHub] [tvm] comaniac merged pull request #9615: [EZ][Autoscheduler] Log exceptions in topi lowering

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


   


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



[GitHub] [tvm] tkonolige commented on a change in pull request #9615: [EZ][Autoscheduler] Log exceptions in topi lowering

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



##########
File path: python/tvm/auto_scheduler/relay_integration.py
##########
@@ -66,9 +67,12 @@ def call_all_topi_funcs(mod, params, target, opt_level=3):
         if params:
             compiler.set_params(params)
         mod = tvm.IRModule.from_expr(mod) if isinstance(mod, relay.Function) else mod
-        compiler.lower(mod, target)
-
-    autotvm.GLOBAL_SCOPE.silent = old_autotvm_silent
+        try:
+            compiler.lower(mod, target)
+        except Exception: # pylint: disable=broad-except

Review comment:
       Do we want to silently eat any error? For example, this will prevent Ctrl-C from working. It might be better to check for TVMError




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



[GitHub] [tvm] comaniac commented on pull request #9615: [EZ][Autoscheduler] Log exceptions in topi lowering

Posted by GitBox <gi...@apache.org>.
comaniac commented on pull request #9615:
URL: https://github.com/apache/tvm/pull/9615#issuecomment-988161643


   Thanks @AndrewZhaoLuo @Hzfengsy @tkonolige 


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



[GitHub] [tvm] AndrewZhaoLuo commented on a change in pull request #9615: [EZ][Autoscheduler] Log exceptions in topi lowering

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



##########
File path: python/tvm/auto_scheduler/relay_integration.py
##########
@@ -66,9 +67,12 @@ def call_all_topi_funcs(mod, params, target, opt_level=3):
         if params:
             compiler.set_params(params)
         mod = tvm.IRModule.from_expr(mod) if isinstance(mod, relay.Function) else mod
-        compiler.lower(mod, target)
-
-    autotvm.GLOBAL_SCOPE.silent = old_autotvm_silent
+        try:
+            compiler.lower(mod, target)
+        except Exception: # pylint: disable=broad-except

Review comment:
       Ah, I thought the ffi ate the type of all exceptions. I see other usages of using TVMError and it works this way so is preferable.




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



[GitHub] [tvm] comaniac commented on a change in pull request #9615: [EZ][Autoscheduler] Log exceptions in topi lowering

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



##########
File path: python/tvm/auto_scheduler/relay_integration.py
##########
@@ -66,9 +67,14 @@ def call_all_topi_funcs(mod, params, target, opt_level=3):
         if params:
             compiler.set_params(params)
         mod = tvm.IRModule.from_expr(mod) if isinstance(mod, relay.Function) else mod
-        compiler.lower(mod, target)
-
-    autotvm.GLOBAL_SCOPE.silent = old_autotvm_silent
+        try:
+            compiler.lower(mod, target)
+
+        # pylint: disable=broad-except
+        except Exception:

Review comment:
       nit
   ```suggestion
           except Exception: # pylint: disable=broad-except
   ```




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