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/12/16 00:27:16 UTC

[GitHub] [tvm] comaniac commented on a change in pull request #9750: [Autoscheduler] Task Extraction Raises Exception on Lowering

comaniac commented on a change in pull request #9750:
URL: https://github.com/apache/tvm/pull/9750#discussion_r770136863



##########
File path: python/tvm/auto_scheduler/relay_integration.py
##########
@@ -48,7 +49,7 @@
 logger = logging.getLogger("auto_scheduler")
 
 
-def call_all_topi_funcs(mod, params, target, opt_level=3):
+def call_all_topi_funcs(mod, params, target, errors: List, opt_level=3):

Review comment:
       To be consistent let's have type annotation for all parameters in this file or nothing.

##########
File path: python/tvm/auto_scheduler/relay_integration.py
##########
@@ -131,14 +132,21 @@ def extract_tasks(
     dispatch_ctx = DispatchContext.current
     old_verbose = dispatch_ctx.verbose
     dispatch_ctx.verbose = 0
+
+    errors = []
     with env:
         # Wrap build call in a new thread to avoid the conflict
         # between python's multiprocessing and tvm's thread pool
         build_thread = threading.Thread(
-            target=call_all_topi_funcs, args=(mod, params, target, opt_level)
+            target=call_all_topi_funcs, args=(mod, params, target, errors, opt_level)
         )
         build_thread.start()
         build_thread.join()
+
+    if len(errors) > 0:

Review comment:
       nit
   ```suggestion
       if errors:
   ```




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