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/04/19 13:04:31 UTC

[GitHub] [tvm] apeskov commented on a change in pull request #7877: Async measurer API for auto-scheduler scripts

apeskov commented on a change in pull request #7877:
URL: https://github.com/apache/tvm/pull/7877#discussion_r615828975



##########
File path: include/tvm/auto_scheduler/measure.h
##########
@@ -340,9 +351,14 @@ class LocalBuilderNode : public ProgramBuilderNode {
  public:
   /*! \brief Build function. */
   String build_func;
+  /*! \brief Functor with python implementation of submit method. */
+  PackedFunc submit_func;

Review comment:
       The main reason of using PackedFunc here instead of string with function name is next. I have to hold a ThreadPool object which will execute submitted tasks. Worker ThreadPool is not a singleton, it's an essential part of Builder/Runner instance and cannot be covered by `@tvm._ffi.register_func` mechanics.
   
   In other words `submit_func` is not just static function, that's a holder for python based resources objects and methods.
   
   I've tried to explain a little bit more detailed in [post](https://github.com/apache/tvm/pull/7877#issuecomment-822442102)




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